I would like to create a chart with sales by category over time. The problem is that the number of categories increases over time, and I don’t want to maintain multiple series each time a new category is added. It seems a stacked bar pivot chart by date and category would be the best solution, but I can’t seem to figure out the syntax.
This is what I’m trying to accomplish, but grouping by multiple fields is not working:
var testChart = {
id:"testChart",
view:"pivot-chart",
height:300,
width:800,
separateLabel: true,
structure:{
groupBy:["Category","Sale_Date"],
values: [{name:"Sales", operation:"sum"}],
filters:[{name:"Category",type:"select"}]
},
url:"data/reportDailySales.php"
};