Commit 6d8eaefa authored by Evgeny's avatar Evgeny

Fix drawing stacked-100 problem

parent 23724104
......@@ -376,7 +376,11 @@ c3_chart_internal_fn.tuneAxis = function(sync, callback){
$$.pushCallback(callback);
if(!$$.config.stacked){
// if we don't need to tune
if($$.config.stacked){
$$.cachedRedraw();
return;
}
var apply = function(){
......@@ -409,7 +413,6 @@ c3_chart_internal_fn.tuneAxis = function(sync, callback){
$$.buffer.onlastfinish("tune-axis", apply);
$$.buffer.onlastfinish("cached-redraw", function(){});
}
}
};
......
......@@ -32,7 +32,7 @@ c3.chart.internal.fn.cachedRedraw = function(options, callback){
$$.pushCallback(callback);
if($$.shouldCache){
if($$.config.shouldCache){
if(!$$.buffer.has("tune-axis")){
$$.buffer.onlastfinish("cached-redraw",
function(){
......
......@@ -192,7 +192,9 @@ c3_chart_internal_fn.getDefaultConfig = function () {
},
tooltip_init_show: false,
tooltip_init_x: 0,
tooltip_init_position: {top: '0px', left: '50px'}
tooltip_init_position: {top: '0px', left: '50px'},
// caching
shouldCache: true
};
Object.keys(this.additionalConfig).forEach(function (key) {
......
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