I've tried using stacked area chart via NVD3 with some real data and it looks strange:
I guess something's wrong with the data or data accessor function but I can't figure out what exactly.
var chart = nv.models.stackedAreaChart()
.x(function(d) { if (typeof d !== "undefined" && d !== null) return d[0] })
.y(function(d) { if (typeof d !== "undefined" && d !== null) return d[1] })
.clipEdge(true)
.useInteractiveGuideline(true)
;
Also I've noticed that it doesn't work at all if "values" array has different length across different data objects. Is it NVD3's restriction or something?
other
scale is used in this example. Series difference is calculated as the difference between elements with the same index of data array. So, think this is why series length should be the same. – krispo0
for all series. should work! – krispo