Hi everyone, I'am new to pentaho CDE.

I'm creating a CCC chart, I'm facing some issue with bar chart combine with line.

The plot 2 is sorted base on month and year. I want the plot 2 is sorted just by month in order to connect each of them together. Like this image below:

readers: ['measure, month, year, value'],

baseAxisComposite: true,

plots: [

{

name: 'main',

visualRoles: {

series: 'measure, year',

category: 'month, year'

}

},

{

type: 'point',

dataPart: '1',

linesVisible: true,

dotsVisible: true,

orthoAxis: 2,

colorAxis: 2,

nullInterpolationMode: 'linear'

}

]

any one can help me to check that, I have spent a lot of time on this issue. I really appreciate it.

Thanks in advance.

Hi Minh Chau,

I've setup an example similar to yours: Bar Chart - Stacked And Grouped with two plots - JSFiddle .

I did use a data set with a slightly different layout, which I believe is more adequate for this problem. In particular, I used two measure columns:

year: 2017, 2018month: "Jan", "Feb", "Mar", "Apr",series: "a", "b"num: the number measureratio: the ratio measureIf you can assume that the number of years in the comparison is always two, previous and current, then the chart can be built in a simpler way by using two overlapped stacked bar plots (instead of using a compositeAxis and a two levels category):

nummeasure; bars displaced to the leftnummeasure; bars displaced to the rightThis achieves the grouped and stacked arrangement of bars while preserving the base axis with the

monthfield alone.Two line plots can now also be defined to represent the

ratiomeasure. Unfortunately, when the dataPart visual role is used, then all plots must specify a single value, and so two line plots are a necessity as well to cover both years.Cheers,

Duarte Cunha Leão