Hello @kukabgd
this can be done in the JS Layout if the data returned by the groovy script is correctly grouped.
I created an example JS snippet with data that you can insert on the following page to see the format you want: https://c3js.org/samples/chart_bar_stacked.html
var chart = c3.generate({
data: {
columns: [
['c1q1', -30, 200, 200, 400, -150, 250],
['c1q2', 130, 100, -100, 200, -150, 50],
['c1q3', 130, 100, -100, 200, -150, 50],
['c2q1', 130, 100, -100, 200, -150, 50],
['c2q2', 130, 100, -100, 200, -150, 50],
['c2q3', -230, 200, 200, -300, 250, 250]
],
type: 'bar',
groups: [
['c1q1','c2q1'],
['c1q2','c2q2'],
['c1q3','c2q3'],
]
},
grid: {
y: {
lines: [{value:0}]
}
}
});
I hope this helps you to get the chart done.
If you have any further questions, you also can use our support portal.
Cheers,
Benjamin
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.