Commit 90ab32dc authored by Evgeny's avatar Evgeny

Redraw after withData

parent 28dba4fd
...@@ -493,6 +493,12 @@ ...@@ -493,6 +493,12 @@
// export element of the chart // export element of the chart
$$.api.element = $$.selectChart.node(); $$.api.element = $$.selectChart.node();
if($$.config.hasSubs || $$.config.isSub){
$$.api.flush();
setTimeout(function(){
$$.api.flush();
}, 200);
}
}; };
c3_chart_internal_fn.smoothLines = function (el, type) { c3_chart_internal_fn.smoothLines = function (el, type) {
...@@ -5090,9 +5096,6 @@ ...@@ -5090,9 +5096,6 @@
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;
...@@ -6458,7 +6461,11 @@ ...@@ -6458,7 +6461,11 @@
x2 -= ($$.getCurrentWidth()); x2 -= ($$.getCurrentWidth());
} else { } else {
try {
$$.config.angle = $$.updateAngle($$.config.newd).startAngle; $$.config.angle = $$.updateAngle($$.config.newd).startAngle;
} catch(e){
$$.config.angle = 0;
}
// Does first sequence take less than half of the chart? // Does first sequence take less than half of the chart?
var small = toDegrees($$.config.angle) > 0; var small = toDegrees($$.config.angle) > 0;
......
...@@ -304,7 +304,12 @@ c3_chart_internal_fn.initWithData = function (data) { ...@@ -304,7 +304,12 @@ 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(); if($$.config.hasSubs || $$.config.isSub){
$$.api.flush();
setTimeout(function(){
$$.api.flush();
}, 200);
}
}; };
c3_chart_internal_fn.smoothLines = function (el, type) { c3_chart_internal_fn.smoothLines = function (el, type) {
......
...@@ -35,7 +35,11 @@ c3.chart.internal.fn.getLineCoordsForBar = function(center, order){ ...@@ -35,7 +35,11 @@ c3.chart.internal.fn.getLineCoordsForBar = function(center, order){
x2 -= ($$.getCurrentWidth()); x2 -= ($$.getCurrentWidth());
} else { } else {
try {
$$.config.angle = $$.updateAngle($$.config.newd).startAngle; $$.config.angle = $$.updateAngle($$.config.newd).startAngle;
} catch(e){
$$.config.angle = 0;
}
// Does first sequence take less than half of the chart? // Does first sequence take less than half of the chart?
var small = toDegrees($$.config.angle) > 0; var small = toDegrees($$.config.angle) > 0;
......
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