Commit 28dba4fd authored by Evgeny's avatar Evgeny

Fix pie-bar problem

parent 42d96f4d
...@@ -31,9 +31,6 @@ c3_chart_internal_fn.updateAngle = function (d) { ...@@ -31,9 +31,6 @@ c3_chart_internal_fn.updateAngle = function (d) {
found = false, index = 0, found = false, index = 0,
gMin = config.gauge_min, gMax = config.gauge_max, gTic, gValue; 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(!t || !d){
return;
}
if (! found && t.data.id === d.data.id) { if (! found && t.data.id === d.data.id) {
found = true; found = true;
d = t; d = t;
...@@ -41,9 +38,6 @@ c3_chart_internal_fn.updateAngle = function (d) { ...@@ -41,9 +38,6 @@ c3_chart_internal_fn.updateAngle = function (d) {
} }
index++; index++;
}); });
if(!d){
return;
}
if (isNaN(d.endAngle)) { if (isNaN(d.endAngle)) {
d.endAngle = d.startAngle; d.endAngle = d.startAngle;
} }
......
...@@ -304,6 +304,7 @@ c3_chart_internal_fn.initWithData = function (data) { ...@@ -304,6 +304,7 @@ c3_chart_internal_fn.initWithData = function (data) {
// export element of the chart // export element of the chart
$$.api.element = $$.selectChart.node(); $$.api.element = $$.selectChart.node();
$$.updateAndRedraw();
}; };
c3_chart_internal_fn.smoothLines = function (el, type) { c3_chart_internal_fn.smoothLines = function (el, type) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment