. Great js module! Quick feature request that will make it much easier to use CSS to style text in the rgraph_domtext_wrapper. Can you give the span tags within them class names for the title, xaxis, yaxis, etc. ? That way, they can be easily selected via CSS and ...
Conversation
... adjusted accordingly. Right now, the span nodes are given ids and style attributes but there are no class attributes. If class attributes were added to the span nodes, it would be much easier to give the title custom css, etc.
Thanks!
1
PS: Here's an example of how I'm currently styling. If there was an option to turn off style attributes in the span tags completely, that would be really helpful -- maybe a "CSS only" style mode to avoid all the !important tags.
codepen.io/sitm/pen/KKPvv
1
(Actually, you will probably still need the style tags for position information but perhaps an option to turn off all styling in the style tags so the styling can be done in CSS via class selectors).
1
Replying to
I can add that. The RGraph.text() function is given a "tag" option each time it's called (eg scale, labels etc) so I can update the function to use that as a CSS class as well - eg rgraph-text-scale
2
1
So the CSS accessor would be: div#cvs_rgraph_domtext_wrapper span.rgraph_text_scale { ... }
1
1
Replying to
That looks perfect. So that should allow selecting the title by class name, xAxis text, etc.
Replying to
That's right - though you may need to use the !important keyword if trying to override something that RGraph sets. Still, should be easier for you to control the text with CSS.
1
Replying to
Ok I added it (haven't fully tested it yet) and, at first glance, it seems to be working so you'll be able to do this:
span.rgraph_accessible_text {
color: red !important;
}
span.rgraph_accessible_text_title {
color: red !important;
font-size: 16pt !important;
}
etc
1
1
Show replies

