Browse Source

Merge pull request #1305 from diesburgm/master

Fixes Uncaught TypeError: Cannot read property 'gauge_min' of null #1205
pull/1414/merge
Masayuki Tanaka 9 years ago
parent
commit
b26ae0dfde
  1. 6
      src/arc.js

6
src/arc.js

@ -26,8 +26,9 @@ c3_chart_internal_fn.updateArc = function () {
c3_chart_internal_fn.updateAngle = function (d) { c3_chart_internal_fn.updateAngle = function (d) {
var $$ = this, config = $$.config, var $$ = this, config = $$.config,
found = false, index = 0, found = false, index = 0;
gMin = config.gauge_min, gMax = config.gauge_max, gTic, gValue; if (config) {
var gMin = config.gauge_min, gMax = config.gauge_max, gTic, gValue;
$$.pie($$.filterTargetsToShow($$.data.targets)).forEach(function (t) { $$.pie($$.filterTargetsToShow($$.data.targets)).forEach(function (t) {
if (! found && t.data.id === d.data.id) { if (! found && t.data.id === d.data.id) {
found = true; found = true;
@ -48,6 +49,7 @@ c3_chart_internal_fn.updateAngle = function (d) {
d.startAngle = -1 * (Math.PI / 2); d.startAngle = -1 * (Math.PI / 2);
d.endAngle = d.startAngle + gTic * gValue; d.endAngle = d.startAngle + gTic * gValue;
} }
}
return found ? d : null; return found ? d : null;
}; };

Loading…
Cancel
Save