AnsweredAssumed Answered

Create paired-stacked bar chart with line chart

Question asked by Lam Do on Nov 26, 2018

Hi,

 

I am new to CDE, and I am trying to create a chart that has paired - stacked bar chart and line charts.

 

I have data set like this:

{

"resultset": [

["2017", "Jan", 250, 290, 80, 70],

["2017", "Feb", 200, 100, 60, 40],

["2017", "Mar", 150, 290, 80, 20],

["2017", "Apr", 350, 100, 20, 10],

["2018", "Jan", 150, 70, 10, 60],

["2018", "Feb", 550, 250, 50, 70],

["2018", "Mar", 150, 120, 80, 80],

["2018", "Apr", 50, 300, 80, 90]

],

"metadata":[

{"colIndex": 0, "colType": "String", "colName": "year" },

{"colIndex": 1, "colType": "String", "colName": "month" },

{"colIndex": 2, "colType": "Numeric", "colName": "a_num"},

{"colIndex": 3, "colType": "Numeric", "colName": "b_num"},

{"colIndex": 4, "colType": "Numeric", "colName": "a_rate"},

{"colIndex": 5, "colType": "Numeric", "colName": "b_rate"}

]

}

I am trying to create the following chart in CDE:

pentaho_help.png

- has category as month

- for each month, has two columns for each year (2017 and 2018)

- each column of each year is stacked bar of number of A (a_num) and number of B (b_num) for that year

- for each month, also has 4 lines for the rates (a_rate, b_rate for 2017 and a_rate, b_rate for 2018)

 

Can I have any suggestion to archive this kind of chart?

 

I already tried Bar Chart - Stacked And Grouped - JSFiddle and Community Chart Components | Pentaho Community but still not work.

 

Thank you so much.

Outcomes