Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 238
Mark Henry Avatar asked Dec 10 '22 23:12

Mark Henry


2 Answers

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.

like image 64
ᅙᄉᅙ Avatar answered May 16 '23 07:05

ᅙᄉᅙ


.c3 path, .c3 line, .tick text { 
  stroke: white;
}
like image 21
Developer Avatar answered May 16 '23 09:05

Developer