Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colorize Y-Grid Lines #362

Closed
DieterSpringer opened this issue Jun 16, 2014 · 4 comments
Closed

colorize Y-Grid Lines #362

DieterSpringer opened this issue Jun 16, 2014 · 4 comments

Comments

@DieterSpringer
Copy link

Hi.

How can i colorize Y grid lines?
I want to show a chart with three lines and show the averages as Y-Grid-Lines. To make it clear, that the shown average is the value from a given line, i want to use the same color for the line in the graph and for the average.
I tried to archive this using CSS only, but failed, as i can only select

<g class="c3-ygrid-line">

Is there another possibility? Or can you add an additional property of color to the grid-Lines?

@itsjoekent
Copy link

I came here looking how to do this as well, black grid lines on black background doesn't really work

@masayuki0812
Copy link
Member

Hi, I think you can do that like this fiddle http://jsfiddle.net/EgESr/1/ . Could you check this?

@DieterSpringer
Copy link
Author

Hi Masayuki,
this works well in my case. I never thought about assigning a class manually.
I thought, that there should be some kind of automatically assigned classes like c3-ygrid-line-# as you do with many other objects in the charts. Maybe you should do something like that nevertheless
But naming the line by myself is simple.

Thank you very much indeed. You are a magician, Masayuki ;-)

@ecgdeveloper
Copy link

I want to show all grid lines solid in black color without specifying class for each element. Please provide solution if you are aware about it.

I don't know why c3.js showing grid lines dotted instead of solid lines. This doen't look good at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants