Axis Label color and position
Is it possible to set the Axis label color and position. See the image below for an example of what I might like to accomplish. This is the chart we currently have implemented.
If the color were configurable via css, that would be great.
Thanks, Nathan
Hi, it is possible to display like your screenshot.
First, specify axis.y.label.position and axis.y2.label.position to outer-middle. This option changes the position of axis label. Sample is here: http://c3js.org/samples/axes_label_position.html
Second, add style .c3-axis-y .tick and .c3-axis-y-label for y axis and .c3-axis-y2 .tick and .c3-axis-y2-label for y2 axis. These style change the style of axis ticks and labels. I added templates for these style in c3.css by the commit above.
Could you try these?
Once again... perfect and wonderful!
@masayuki0812 Can you document somewhere the css options we have. I don't see it in examples or reference on the website. Thanks!
@keyscores They're at http://www.c3js.org/reference.html under "CLASS" in the sidebar, but not documented yet. Apologies, it's something I keep meaning to get around to.
That said — documentation pull requests for masayuki0819/c3js.org are extremely welcome, if you care to do so! :smile: :+1:
now i can't set y2 tick color via css: .c3-axis-y2 .tick{ color: #FE7E0D; }
@dew063 you should use 'fill' instead of 'color': .c3-axis-y2 .tick { fill: #FEFE0D; }
Can you please add more information where to add this style in the code ??