From 362470c184fa638b8bfdf1a4497156b049c51a21 Mon Sep 17 00:00:00 2001 From: flaurida Date: Fri, 22 Dec 2017 15:06:03 -0500 Subject: [PATCH 01/16] Allow spanning gaps for radar --- src/controllers/controller.radar.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/controllers/controller.radar.js b/src/controllers/controller.radar.js index 5de4e4ede0a..b0fd5f03f84 100644 --- a/src/controllers/controller.radar.js +++ b/src/controllers/controller.radar.js @@ -50,6 +50,8 @@ module.exports = function(Chart) { // Model _model: { // Appearance + // This option gives lines the ability to span gaps + spanGaps: dataset.spanGaps ? dataset.spanGaps : options.spanGaps, tension: custom.tension ? custom.tension : helpers.valueOrDefault(dataset.lineTension, lineElementOptions.tension), backgroundColor: custom.backgroundColor ? custom.backgroundColor : (dataset.backgroundColor || lineElementOptions.backgroundColor), borderWidth: custom.borderWidth ? custom.borderWidth : (dataset.borderWidth || lineElementOptions.borderWidth), From 90c2742adaae0689ef5e9f0555046a462ad378f1 Mon Sep 17 00:00:00 2001 From: flaurida Date: Fri, 22 Dec 2017 15:10:56 -0500 Subject: [PATCH 02/16] Fix options not being defined --- src/controllers/controller.radar.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/controllers/controller.radar.js b/src/controllers/controller.radar.js index b0fd5f03f84..d4fe545ab44 100644 --- a/src/controllers/controller.radar.js +++ b/src/controllers/controller.radar.js @@ -30,6 +30,7 @@ module.exports = function(Chart) { var meta = me.getMeta(); var line = meta.dataset; var points = meta.data; + var options = me.chart.options; var custom = line.custom || {}; var dataset = me.getDataset(); var lineElementOptions = me.chart.options.elements.line; From 85ac7e734e71c930344f9c5abfdb26b6c956991a Mon Sep 17 00:00:00 2001 From: flaurida Date: Fri, 22 Dec 2017 15:40:03 -0500 Subject: [PATCH 03/16] Support multiple point label font colors --- src/scales/scale.radialLinear.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/scales/scale.radialLinear.js b/src/scales/scale.radialLinear.js index 9f59f17887a..3c60e475f91 100644 --- a/src/scales/scale.radialLinear.js +++ b/src/scales/scale.radialLinear.js @@ -268,8 +268,11 @@ module.exports = function(Chart) { // Keep this in loop since we may support array properties here var pointLabelFontColor = valueOrDefault(pointLabelOpts.fontColor, globalDefaults.defaultFontColor); + var pointLabelFontColorFormatted = helpers.isArray(pointLabelFontColor) ? + pointLabelFontColor[i] : pointLabelFontColor; + ctx.font = plFont.font; - ctx.fillStyle = pointLabelFontColor; + ctx.fillStyle = pointLabelFontColorFormatted; var angleRadians = scale.getIndexAngle(i); var angle = helpers.toDegrees(angleRadians); From 9f769b42350c78c696d18cfdd000a1c02f5f2a6c Mon Sep 17 00:00:00 2001 From: flaurida Date: Fri, 22 Dec 2017 15:44:08 -0500 Subject: [PATCH 04/16] Update documentation --- docs/axes/radial/linear.md | 2 +- docs/charts/radar.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/axes/radial/linear.md b/docs/axes/radial/linear.md index adebe77cc61..3abee39524b 100644 --- a/docs/axes/radial/linear.md +++ b/docs/axes/radial/linear.md @@ -104,7 +104,7 @@ The following options are used to configure the point labels that are shown on t | Name | Type | Default | Description | -----| ---- | --------| ----------- | `callback` | `Function` | | Callback function to transform data labels to point labels. The default implementation simply returns the current string. -| `fontColor` | `Color` | `'#666'` | Font color for point labels. +| `fontColor` | ``Color/Color[]`` | `'#666'` | Font color for point labels. | `fontFamily` | `String` | `"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif"` | Font family to use when rendering labels. | `fontSize` | `Number` | 10 | font size in pixels | `fontStyle` | `String` | `'normal'` | Font style to use when rendering point labels. diff --git a/docs/charts/radar.md b/docs/charts/radar.md index ac908315cf9..76548e0e552 100644 --- a/docs/charts/radar.md +++ b/docs/charts/radar.md @@ -88,6 +88,7 @@ All point* properties can be specified as an array. If these are set to an array | `pointHoverBorderColor` | `Color/Color[]` | Point border color when hovered. | `pointHoverBorderWidth` | `Number/Number[]` | Border width of point when hovered. | `pointHoverRadius` | `Number/Number[]` | The radius of the point when hovered. +| `spanGaps` | `Boolean` | If true, lines will be drawn between points with no or null data. If false, points with `NaN` data will create a break in the line ### pointStyle The style of point. Options are: From 5ad2ba995c4c137dbc61d03ee32c24870a8e07ae Mon Sep 17 00:00:00 2001 From: flaurida Date: Fri, 22 Dec 2017 15:51:24 -0500 Subject: [PATCH 05/16] Add test for spanGaps in radar chart --- test/specs/controller.radar.tests.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/specs/controller.radar.tests.js b/test/specs/controller.radar.tests.js index df1001420c4..a2362d8ec69 100644 --- a/test/specs/controller.radar.tests.js +++ b/test/specs/controller.radar.tests.js @@ -480,4 +480,19 @@ describe('Chart.controllers.radar', function() { expect(meta0.data[0]._model.radius).toBe(10); expect(meta1.data[0]._model.radius).toBe(20); }); + + it('should allow spanGaps to be set to true', function() { + var chart = window.acquirechart({ + type: 'radar', + data: { + datasets: [{ + data: [10, 15, NaN, 4], + spanGaps: true, + }], + labels: ['label1', 'label2', 'label3', 'label4'], + } + }); + var meta = chart.getDatasetMeta(0); + expect(meta.spanGaps).toBeTrue(); + }); }); From 0f859e782e936086d2b54d149827d572d8a7729b Mon Sep 17 00:00:00 2001 From: flaurida Date: Fri, 22 Dec 2017 15:51:59 -0500 Subject: [PATCH 06/16] Remove type in linear docs --- docs/axes/radial/linear.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/axes/radial/linear.md b/docs/axes/radial/linear.md index 3abee39524b..14009be6a5c 100644 --- a/docs/axes/radial/linear.md +++ b/docs/axes/radial/linear.md @@ -104,7 +104,7 @@ The following options are used to configure the point labels that are shown on t | Name | Type | Default | Description | -----| ---- | --------| ----------- | `callback` | `Function` | | Callback function to transform data labels to point labels. The default implementation simply returns the current string. -| `fontColor` | ``Color/Color[]`` | `'#666'` | Font color for point labels. +| `fontColor` | `Color/Color[]` | `'#666'` | Font color for point labels. | `fontFamily` | `String` | `"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif"` | Font family to use when rendering labels. | `fontSize` | `Number` | 10 | font size in pixels | `fontStyle` | `String` | `'normal'` | Font style to use when rendering point labels. From 3084a9e5d962df0af7cd65b25b0f4ad1c161ce3d Mon Sep 17 00:00:00 2001 From: flaurida Date: Fri, 22 Dec 2017 15:56:36 -0500 Subject: [PATCH 07/16] Fix typo in test --- test/specs/controller.radar.tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/specs/controller.radar.tests.js b/test/specs/controller.radar.tests.js index a2362d8ec69..12a02a26e77 100644 --- a/test/specs/controller.radar.tests.js +++ b/test/specs/controller.radar.tests.js @@ -482,7 +482,7 @@ describe('Chart.controllers.radar', function() { }); it('should allow spanGaps to be set to true', function() { - var chart = window.acquirechart({ + var chart = window.acquireChart({ type: 'radar', data: { datasets: [{ From 2df76e49153a29f49940533b014661910a0905f5 Mon Sep 17 00:00:00 2001 From: flaurida Date: Fri, 22 Dec 2017 16:02:01 -0500 Subject: [PATCH 08/16] Fix another typo in test --- test/specs/controller.radar.tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/specs/controller.radar.tests.js b/test/specs/controller.radar.tests.js index 12a02a26e77..ac4518e58e0 100644 --- a/test/specs/controller.radar.tests.js +++ b/test/specs/controller.radar.tests.js @@ -493,6 +493,6 @@ describe('Chart.controllers.radar', function() { } }); var meta = chart.getDatasetMeta(0); - expect(meta.spanGaps).toBeTrue(); + expect(meta.spanGaps).toBe(true); }); }); From 4bea40585eae6226dd80bd03ec7636caf59edb26 Mon Sep 17 00:00:00 2001 From: flaurida Date: Fri, 22 Dec 2017 17:06:56 -0500 Subject: [PATCH 09/16] Try to address failing test --- test/specs/controller.radar.tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/specs/controller.radar.tests.js b/test/specs/controller.radar.tests.js index ac4518e58e0..709e1533bb5 100644 --- a/test/specs/controller.radar.tests.js +++ b/test/specs/controller.radar.tests.js @@ -493,6 +493,6 @@ describe('Chart.controllers.radar', function() { } }); var meta = chart.getDatasetMeta(0); - expect(meta.spanGaps).toBe(true); + expect(meta._model.spanGaps).toBe(true); }); }); From 23468aaf4eec5ca289d31ea666ce3d3c79e28593 Mon Sep 17 00:00:00 2001 From: flaurida Date: Sat, 23 Dec 2017 11:49:21 -0500 Subject: [PATCH 10/16] Address review comment --- src/scales/scale.radialLinear.js | 6 ++---- test/specs/controller.radar.tests.js | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/scales/scale.radialLinear.js b/src/scales/scale.radialLinear.js index 3c60e475f91..06c467f7702 100644 --- a/src/scales/scale.radialLinear.js +++ b/src/scales/scale.radialLinear.js @@ -267,12 +267,10 @@ module.exports = function(Chart) { var pointLabelPosition = scale.getPointPosition(i, outerDistance + 5); // Keep this in loop since we may support array properties here - var pointLabelFontColor = valueOrDefault(pointLabelOpts.fontColor, globalDefaults.defaultFontColor); - var pointLabelFontColorFormatted = helpers.isArray(pointLabelFontColor) ? - pointLabelFontColor[i] : pointLabelFontColor; + var pointLabelFontColor = helpers.valueAtIndexOrDefault(pointLabelOpts.fontColor, i, globalDefaults.defaultFontColor); ctx.font = plFont.font; - ctx.fillStyle = pointLabelFontColorFormatted; + ctx.fillStyle = pointLabelFontColor; var angleRadians = scale.getIndexAngle(i); var angle = helpers.toDegrees(angleRadians); diff --git a/test/specs/controller.radar.tests.js b/test/specs/controller.radar.tests.js index 709e1533bb5..7384b7ad7a6 100644 --- a/test/specs/controller.radar.tests.js +++ b/test/specs/controller.radar.tests.js @@ -493,6 +493,6 @@ describe('Chart.controllers.radar', function() { } }); var meta = chart.getDatasetMeta(0); - expect(meta._model.spanGaps).toBe(true); + expect(meta.dataset._model.spanGaps).toBe(true); }); }); From 2a6b81cd9d25f0fd40f85491a79067d72ee5ff88 Mon Sep 17 00:00:00 2001 From: flaurida Date: Sat, 23 Dec 2017 12:07:03 -0500 Subject: [PATCH 11/16] Remove unnecessary line --- src/scales/scale.radialLinear.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/scales/scale.radialLinear.js b/src/scales/scale.radialLinear.js index 06c467f7702..7c253dae3d3 100644 --- a/src/scales/scale.radialLinear.js +++ b/src/scales/scale.radialLinear.js @@ -470,7 +470,6 @@ module.exports = function(Chart) { var opts = me.options; var gridLineOpts = opts.gridLines; var tickOpts = opts.ticks; - var valueOrDefault = helpers.valueOrDefault; if (opts.display) { var ctx = me.ctx; From b28d11e03882be14d687264f6b5846899aa54978 Mon Sep 17 00:00:00 2001 From: flaurida Date: Sat, 23 Dec 2017 15:21:11 -0500 Subject: [PATCH 12/16] Fix wrong deleted line --- src/scales/scale.radialLinear.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scales/scale.radialLinear.js b/src/scales/scale.radialLinear.js index 7c253dae3d3..bc7eebe4191 100644 --- a/src/scales/scale.radialLinear.js +++ b/src/scales/scale.radialLinear.js @@ -237,7 +237,6 @@ module.exports = function(Chart) { function drawPointLabels(scale) { var ctx = scale.ctx; - var valueOrDefault = helpers.valueOrDefault; var opts = scale.options; var angleLineOpts = opts.angleLines; var pointLabelOpts = opts.pointLabels; @@ -470,6 +469,7 @@ module.exports = function(Chart) { var opts = me.options; var gridLineOpts = opts.gridLines; var tickOpts = opts.ticks; + var valueOrDefault = helpers.valueOrDefault; if (opts.display) { var ctx = me.ctx; From 936c82278949af9b9b541ea6b6cf10f8b23d178d Mon Sep 17 00:00:00 2001 From: flaurida Date: Sun, 24 Dec 2017 13:41:53 -0500 Subject: [PATCH 13/16] Add JSON file and image tests --- .../radar-span-gaps-disable.json | 42 ++++++++++++++++++ .../radar-span-gaps-disable.png | Bin 0 -> 5364 bytes .../radar-span-gaps-enable.json | 42 ++++++++++++++++++ .../radar-span-gaps-enable.png | Bin 0 -> 2737 bytes test/specs/controller.radar.tests.js | 2 + 5 files changed, 86 insertions(+) create mode 100644 test/fixtures/controller.radar/radar-span-gaps-disable.json create mode 100644 test/fixtures/controller.radar/radar-span-gaps-disable.png create mode 100644 test/fixtures/controller.radar/radar-span-gaps-enable.json create mode 100644 test/fixtures/controller.radar/radar-span-gaps-enable.png diff --git a/test/fixtures/controller.radar/radar-span-gaps-disable.json b/test/fixtures/controller.radar/radar-span-gaps-disable.json new file mode 100644 index 00000000000..e9e995d2bf5 --- /dev/null +++ b/test/fixtures/controller.radar/radar-span-gaps-disable.json @@ -0,0 +1,42 @@ +{ + "config": { + "type": "line", + "data": { + "labels": ["0", "1", "2", "3", "4"], + "datasets": [{ + "backgroundColor": "rgba(0, 0, 192, 0.25)", + "data": [2, 3, 4, null, 1] + }] + }, + "options": { + "responsive": false, + "spanGaps": false, + "legend": false, + "title": false, + "scales": { + "xAxes": [{ + "display": false + }], + "yAxes": [{ + "display": false + }] + }, + "elements": { + "point": { + "radius": 0 + }, + "line": { + "borderColor": "transparent", + "fill": "end", + "tension": 0 + } + } + } + }, + "options": { + "canvas": { + "height": 256, + "width": 512 + } + } +} \ No newline at end of file diff --git a/test/fixtures/controller.radar/radar-span-gaps-disable.png b/test/fixtures/controller.radar/radar-span-gaps-disable.png new file mode 100644 index 0000000000000000000000000000000000000000..f9044887e890c2eb75ad1b0451a84eb81bd1cc7c GIT binary patch literal 5364 zcmYjVc|28V_6l&B`D7%?rD zHYU3=?i53tm_*q#g}D;qR^(p4=Ul(v=kxPVyytzt&-eL0-{*PH>4b}uz2X9`1qdO< zO&e{tAcVoM3`EGnKlNvt0uWNYx5;L`+hMY7YgyJlubmH-PHa|B z&L!k+&MYsVlApRXW#D^u$D&TxWiA%w^C!1wmA>ef1XUht(BJ0S{l;wml;z9vD&_HK z{tx1D;*{RlGM&8SFYY!m<{j_4FCc#MDvVmgHqI2J-ecwW+I3kZQpsNim?)8I=@7&o z*I=S!Aq+H6?*66e5XtaNb`r&(7P!mJIFqQEz>hJ%Otr?hTu-93z5iM+cb~;Xr5OKD znaega)64o#e;)AV5*G*G8ek*x1R7~?RwR6Mj01$9my=(an(idhEc^JOyF~Dy(4QEp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Cj2?O&df1)_;Xfh z=9mloIU8u^n6ds~y}kWGRL&F7_h}e`kZ2IIJ$>a6%D>d379~UdQ2iIu0+_ad@qm z%ME+Q*_cC|J+Ki(E$nuHzRbgi1PC25&BYMqtBf8OrupqsbS-I8!Cz6dVSRAGKi8^1 F{VyGswj=-m literal 0 HcmV?d00001 diff --git a/test/specs/controller.radar.tests.js b/test/specs/controller.radar.tests.js index 7384b7ad7a6..a0409d508ab 100644 --- a/test/specs/controller.radar.tests.js +++ b/test/specs/controller.radar.tests.js @@ -1,4 +1,6 @@ describe('Chart.controllers.radar', function() { + describe('auto', jasmine.specsFromFixtures('controller.radar')); + it('Should be constructed', function() { var chart = window.acquireChart({ type: 'radar', From 7b2a8d2e8b4b9da6d62b082e5c1e37b853011145 Mon Sep 17 00:00:00 2001 From: flaurida Date: Tue, 26 Dec 2017 11:48:25 -0500 Subject: [PATCH 14/16] Update span gaps tests --- .../radar-span-gaps-disable.json | 27 +++++++----------- .../radar-span-gaps-disable.png | Bin 5364 -> 4713 bytes .../radar-span-gaps-enable.json | 26 +++++++---------- .../radar-span-gaps-enable.png | Bin 2737 -> 4713 bytes 4 files changed, 21 insertions(+), 32 deletions(-) diff --git a/test/fixtures/controller.radar/radar-span-gaps-disable.json b/test/fixtures/controller.radar/radar-span-gaps-disable.json index e9e995d2bf5..32b68473bbb 100644 --- a/test/fixtures/controller.radar/radar-span-gaps-disable.json +++ b/test/fixtures/controller.radar/radar-span-gaps-disable.json @@ -1,34 +1,29 @@ { "config": { - "type": "line", + "debug": true, + "type": "radar", "data": { - "labels": ["0", "1", "2", "3", "4"], + "labels": ["0", "1", "2", "3", "4", "5", "6", "7"], "datasets": [{ - "backgroundColor": "rgba(0, 0, 192, 0.25)", - "data": [2, 3, 4, null, 1] + "backgroundColor": "transparent", + "data": [4, 2, null, 3, 2.5, null, 2, 4], + "spanGaps": false }] }, "options": { "responsive": false, - "spanGaps": false, "legend": false, "title": false, - "scales": { - "xAxes": [{ - "display": false - }], - "yAxes": [{ - "display": false - }] + "scale": { + "display": false }, "elements": { "point": { "radius": 0 }, "line": { - "borderColor": "transparent", - "fill": "end", - "tension": 0 + "borderColor": "pink", + "fill": "origin" } } } @@ -36,7 +31,7 @@ "options": { "canvas": { "height": 256, - "width": 512 + "width": 256 } } } \ No newline at end of file diff --git a/test/fixtures/controller.radar/radar-span-gaps-disable.png b/test/fixtures/controller.radar/radar-span-gaps-disable.png index f9044887e890c2eb75ad1b0451a84eb81bd1cc7c..1217b8b3a8bbffcde5c93dbc0db197778800fa85 100644 GIT binary patch literal 4713 zcmeHL`9D$ePHKvc~tmzu)iU@%bOVkMB?Sp8Gn_=j*&)=bY#3oEvk_M4z3NpA`VWZfKxm z3IK$>LIBNzJT7||I0L{XYpA1nfo!{&=^l64;!f*cH#yVd3elGTElK%6l&FzwuQQ=O;m2$Ih7|kG#qb)(@ML0Osm+>@OWAEiMPG$ z1uu=nuUlC?t-b2p9htU){5W;|@V>s2xFh13NLQG8|ki%j<`4Yu8)4Z;-e$I+fsOSUT{ zPpD!?$x6I&F3|@G-t3Z+qrb0`Gm7_2YUwSx5xFV&9%Jdf6q`HKF{P8jl+vk3K6uzO z$;HyrKfTJg`XEENOj04JaS?W%~&n{{T=mUzw1ZGEO+X5ULXIS z(-gZ@Ic%}>?CHSsPXvnT5WgP|=9TM}tzRWxT32AMw#lRNs8$B+m2MwuvQeo1;qlSU zVt5*zbMpQr9xWg`xj(k!m0bX)JIJP&nOSjH!`Qd7>4S^=pGU366*0biaCD?XQ4`ue z{9V(^Bz1lzwQ_BYDpQ*`o~I%8{RXRVk8^(AX|3;5#yFDql=NXDMd%8KQ@Y-$Xp5rt z&b$=QOx+=s2FQPT-&!)Z875>jP=|tOM?zvDY=hW|@Xbxkuv5U`ZfJ?~J!*u<@48Xr zvw{82E&*eI%QmAxX^g~t4tiX*W}?wiBe##v*k1KWUF&0B6QnlHI*n>L^$n`>%V$Qn z;7B^}_#Wti9}W>M&kxfUH7c`H-JTMf9se%<;m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gED73ssxaYaaDLsa>f2b9=m{RPDc?7j3Q^x)>WQ|RtnMH4rR3hkFqDPG? z7iv7IBo)hfeu*}|pH}5=Xb`o019>-6?3<6^tTao;`ldayg!t0TZrGV0?ilj#Kw`KH zWuH=#egxG9<=lN1@e2jdZ=H?ben{mmfg1g_;?VpQdrgfVWq;&C_A^TI?IuynB?yxc zj)U-42;XgdVRk-xn`USzehn5`U^_3Oa#=*HSGN0=i3~NX01T|HL8=2XWTQT++Mieb^{} zn&}Z1dcGG^*(C%EZ`gV1Z5>r+C#GlqT`Rs{TAy`q++mnfy;{$l1s^IitEHGdQ&w_N z~4rtWy%~Jz%8*D^|gS4@PwaNcpB-lvg>589++O z>x8v{1QjVkPeq>L&0zvdD5rP4gVITF!gASX+G+(soL)#2I9F9`w1UXHqg{ z38Bq^Q@0Bm;1qR3R$>1MTn=xg=Ra@LOmJ>4E{9=q0ZRUc%i&|uHLy*itcpW#d@que zj$->^>m+Azxyr_eLQmBK{g#o(XC9{7`3*oQYS6(Je7#Gczx!Nfa#fU9xxT{Wz63kr z7|T6) zO2as$qF25=XWV%i2P#8e($ z@|feX3+U>1CVA7O*qmuhhU@vu3=z724llWj5Yr{a;P1%#|A&p8n8B;gyK(}dg@z#! zVp^{p2WadOArxW85ppRnf;AP~fxy1Yavow{D+O}*GzDkhDFt>nrr<0p%?3*;I4dgE zgAGz}R#3n(0|?H(QNS_(NPtzpRsc-(e1fy<3xKKK1>aMo=9_`3Cj2?O&df1)_;Xfh z=9mloIU8u^n6ds~y}kWGRL&F7_h}e`kZ2IIJ$>a6%D>d379~UdQ2iIu0+_ad@qm z%ME+Q*_cC|J+Ki(E$nuHzRbgi1PC25&BYMqtBf8OrupqsbS-I8!Cz6dVSRAGKi8^1 F{VyGswj=-m From 374e2205699687bc4b80db1f2f3eb0c1bc03497b Mon Sep 17 00:00:00 2001 From: flaurida Date: Tue, 26 Dec 2017 11:51:50 -0500 Subject: [PATCH 15/16] Remove debug true from disable test --- test/fixtures/controller.radar/radar-span-gaps-disable.json | 1 - 1 file changed, 1 deletion(-) diff --git a/test/fixtures/controller.radar/radar-span-gaps-disable.json b/test/fixtures/controller.radar/radar-span-gaps-disable.json index 32b68473bbb..a873666c34d 100644 --- a/test/fixtures/controller.radar/radar-span-gaps-disable.json +++ b/test/fixtures/controller.radar/radar-span-gaps-disable.json @@ -1,6 +1,5 @@ { "config": { - "debug": true, "type": "radar", "data": { "labels": ["0", "1", "2", "3", "4", "5", "6", "7"], From 88ec1f2b2be5c5a1e8ece7c2aec31b48d5faa487 Mon Sep 17 00:00:00 2001 From: flaurida Date: Thu, 28 Dec 2017 18:29:49 -0500 Subject: [PATCH 16/16] Fix issue with span gaps option --- src/controllers/controller.line.js | 2 +- src/controllers/controller.radar.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/controllers/controller.line.js b/src/controllers/controller.line.js index 9d9206d5cb2..882cdf5cdd0 100644 --- a/src/controllers/controller.line.js +++ b/src/controllers/controller.line.js @@ -68,7 +68,7 @@ module.exports = function(Chart) { // The default behavior of lines is to break at null values, according // to https://github.com/chartjs/Chart.js/issues/2435#issuecomment-216718158 // This option gives lines the ability to span gaps - spanGaps: dataset.spanGaps ? dataset.spanGaps : options.spanGaps, + spanGaps: (dataset.spanGaps !== undefined ? dataset.spanGaps : options.spanGaps), tension: custom.tension ? custom.tension : helpers.valueOrDefault(dataset.lineTension, lineElementOptions.tension), backgroundColor: custom.backgroundColor ? custom.backgroundColor : (dataset.backgroundColor || lineElementOptions.backgroundColor), borderWidth: custom.borderWidth ? custom.borderWidth : (dataset.borderWidth || lineElementOptions.borderWidth), diff --git a/src/controllers/controller.radar.js b/src/controllers/controller.radar.js index d4fe545ab44..d11e3bdba27 100644 --- a/src/controllers/controller.radar.js +++ b/src/controllers/controller.radar.js @@ -52,8 +52,7 @@ module.exports = function(Chart) { _model: { // Appearance // This option gives lines the ability to span gaps - spanGaps: dataset.spanGaps ? dataset.spanGaps : options.spanGaps, - tension: custom.tension ? custom.tension : helpers.valueOrDefault(dataset.lineTension, lineElementOptions.tension), + spanGaps: (dataset.spanGaps !== undefined ? dataset.spanGaps : options.spanGaps), backgroundColor: custom.backgroundColor ? custom.backgroundColor : (dataset.backgroundColor || lineElementOptions.backgroundColor), borderWidth: custom.borderWidth ? custom.borderWidth : (dataset.borderWidth || lineElementOptions.borderWidth), borderColor: custom.borderColor ? custom.borderColor : (dataset.borderColor || lineElementOptions.borderColor),