I am trying to dynamically load a region to a line chart in C3.js using the load api.
The column data loads fine but there is no change to the regions. I don't want to use the regions.add api because I require a dashed line for this project.
chart.load({
columns:[
['data2', 10, 30, 20, 50, 40, 60, 50]
],
regions: {
'data2': [{'start':3, 'style':'dashed'}]
}
});
I would really appreciate any help, I am so stuck - thank you!
As per their documentation c3 api load you can only pass these values in load
call
url
, json
, rows
, columns
, classes
, categories
, axes
, colors
, type
, types
, unload
and done
To add regions
to load
call you need to raise issue with them on their github pages or check if one already exists
As of now only solution is to use regions.add but it does not support dash style as of now
check Demo:Fiddle
You can raise an issue to add dash style instead of adding regions
to load
call as it may be easier and faster for them to fix
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With