I am currently working with time series data stored in an array structured like this:
var data = [
[{date: 2016-01-01 00:00:00, value: 52},
{date: 2016-01-02 00:00:00, value: 23},
{date: 2016-01-03 00:00:00, value: 42},
{date: 2016-01-04 00:00:00, value: 12,
...
],
[{date: 2016-01-01 00:00:00, value: 12},
{date: 2016-01-02 00:00:00, value: 42},
{date: 2016-01-03 00:00:00, value: 35},
{date: 2016-01-04 00:00:00, value: 11},
...
],
...
]
In this structure, each data[i]
corresponds to a daily time series dataset for a specific component.
My objective is to generate a stacked bar chart for each {date, value}
entry, where different sections of the bars represent data[0]
, data[1]
, and so on up to data[data.length-1]
.
What would be the most efficient approach to achieve this using d3? Appreciate your insights!