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
callurl
,json
,rows
,columns
,classes
,categories
,axes
,colors
,type
,types
,unload
anddone
To add
regions
toload
call you need to raise issue with them on their github pages or check if one already existsAs 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
toload
call as it may be easier and faster for them to fix