mark mark - 7 months ago 44
Javascript Question

c3 graph in a dark background; how to change axis and tick value color

I have plotted a graph on a dark background but due to the axis-color and tick-value color it is very difficult to read. How do I change to color of the axis, ticks and axis tick value to white?

Answer

You could use CSS to style the graph, for example

path.domain { stroke: white; }
.tick text { stroke: yellow; }
.c3-legend-item text { stroke: grey; }

To make the axis white, the tick labels yellow, and the legend text grey.