Hide c3js lines on spline graphe

1.2k views Asked by At

On c3js spine graph is it possible to hide the line using the API? I know I could use a scatter graph instead, but I got to use spline with my requirements.

Also, setting the opacity of .c3-lines.c3-line to 0 is hiding it, but I want to know if I can achieve it through the API

1

There are 1 answers

3
potatopeelings On

Yes you can hide it using the API. See http://c3js.org/reference.html#api-hide. Samples from the documentation.

// data1 will be hidden.
chart.hide('data1');

// data1 and data2 will be hidden.
chart.hide(['data1', 'data2']);

// all targets will be hidden.
chart.hide();

// data1 will be hidden together with its legend.
chart.hide('data1', {withLegend: true});