From 6632b8ba8475e020fd0533e2630117376a9cbc73 Mon Sep 17 00:00:00 2001 From: Akihiko Kusanagi Date: Sun, 21 Jul 2019 14:00:12 +0200 Subject: [PATCH] Add radar chart config options (#6393) * Add radar chart config options * Add default value of spanGaps option for radar charts * Address review comments --- docs/charts/radar.md | 6 +++++- src/controllers/controller.radar.js | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/charts/radar.md b/docs/charts/radar.md index 90e05a55e83..196d6b1eb72 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 57fd8267bd9..62763ff0980 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' },