Closed joannecheng closed 8 years ago
We can calculate the minimum w/ this (console demo):
var mins = [];
Keen.utils.each(chart.dataset.selectRow(0), function(col, i){
if (i > 0) {
mins.push(chart.dataset.minimum(chart.dataset.selectColumn(i)));
}
});
console.log( chart.dataset.minimum(mins) );
(dataset.minimum()
takes an array and returns the min value found)
This seems to be a known c3 issue, though it hasn't been addressed directly yet: https://github.com/masayuki0812/c3/issues/1523. This also appears to only occur in stacked line
, spline
, and step
charts, which aren't exactly ideal types for representing a whole, as one would aim for by setting stacked = true
. Perhaps we just wait on this awhile and see if it gets fixed upstream? What do you think @joannecheng?
Closing for now, as this should be fixed in a future update to c3.js.
From example page on http://keen.github.io/keen-dataviz.js/:
I think this is a c3 issue. We could solve this quickly by setting
options.y.axis = { min: 0, padding: { bottom: 0 } }
in therender
method indefault
, but we'll lose some of the auto scaling that c3 does. Thoughts?