From: Akihiko Kusanagi Date: Sun, 21 Jul 2019 12:00:12 +0000 (+0200) Subject: Add radar chart config options (#6393) X-Git-Tag: v2.9.0~1^2~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6632b8ba8475e020fd0533e2630117376a9cbc73;p=thirdparty%2FChart.js.git Add radar chart config options (#6393) * Add radar chart config options * Add default value of spanGaps option for radar charts * Address review comments --- diff --git a/docs/charts/radar.md b/docs/charts/radar.md index 90e05a55e..196d6b1eb 100644 --- a/docs/charts/radar.md +++ b/docs/charts/radar.md @@ -143,7 +143,11 @@ The interaction with each point can be controlled with the following properties: ## Configuration Options -Unlike other charts, the radar chart has no chart specific options. +The radar chart defines the following configuration options. These options are merged with the global chart configuration options, `Chart.defaults.global`, to form the options passed to the chart. + +| Name | Type | Default | Description +| ---- | ---- | ------- | ----------- +| `spanGaps` | `boolean` | `false` | If false, NaN data causes a break in the line. ## Scale Options diff --git a/src/controllers/controller.radar.js b/src/controllers/controller.radar.js index 57fd8267b..62763ff09 100644 --- a/src/controllers/controller.radar.js +++ b/src/controllers/controller.radar.js @@ -8,6 +8,7 @@ var helpers = require('../helpers/index'); var valueOrDefault = helpers.valueOrDefault; defaults._set('radar', { + spanGaps: false, scale: { type: 'radialLinear' },