jQuery UI Widgets › Forums › Chart › valueAxis description
This topic contains 9 replies, has 2 voices, and was last updated by mrezzonico 2 years, 4 months ago.
-
AuthorvalueAxis description Posts
-
Hi all,
is it possible to change the color of “valueAxis -> description” ?
Thanks
MicheHi,
If you mean the labels with the values on the value axis you can set a CSS class and apply a style as shown in the example: http://jsfiddle.net/rhuwxfoa/1/
You can see that I have set a custom class colour and applied a fill style to the labels.
If you have any additional questions, do not hesitate to contact us!
Best regards,
Svetoslav BorislavovjQWidgets Team
https://www.jqwidgets.com/Hi,
please select the following link:
https://www.jqwidgets.com/wp-content/uploads/2012/02/jquery-chart-stacked-column-series.pngWhat I want to change is the color of the label “Time in minutes”.
How can I do this ?Thanks
MicheHi,
Each axis has a property title, which can accept object with these props:
visible – a boolean determining whether the title is visible.
text – a string representing the text of the axis title.
class – a string representing the CSS class of the axis title.
horizontalAlignment – horizontal alignment of the axis title. Valid values are ‘left’, ‘center’, ‘right’.
verticalAlignment – vertical alignment of the axis title. Valid values are ‘top’, ‘center’, ‘bottom’.Here is an example of changing the title colour: http://jsfiddle.net/26fxtk3r/
Best regards,
Svetoslav BorislavovjQWidgets Team
https://www.jqwidgets.com/Hi,
it works, thanks !!
A last question …
Is it possible to change the color without creating the “<style>.colored {fill: #ff0000}</style>” element ?
Example 1:
title: { text: 'Time in minutes', color: '#ff0000' }
Example 2:
title: { text: 'Time in minutes', class: 'jqx-chart-axis-description <style>{fill: #ff0000}</style>' }
Thanks
MicheHi,
You can select it with its class or add a custom class and select the element by it and then style it programmatically
See the example: http://jsfiddle.net/z3295wrg/1/If you need further help, let us know!
Best regards,
Svetoslav BorislavovjQWidgets Team
https://www.jqwidgets.com/Hi,
thanks a lot for your help.
I have implemented your first solution (with the class).Is it also possible to change the color of the values of a single valueAxis (not for all valueAxis by changing “jqx-chart-axis-text” in jqx.base.css) ?
Example
valueAxis: { ??????: { class: 'jqx-chart-axis-text colored' } }
Thanks Miche
It would also be useful if it were possible to change the color of the line along the tickMarks !
Regards
MicheHi,
The value axis has a ‘labels’ object in which you can set the class.
The ‘gridLines’ and the ‘tickMarks objects accept a colour property.
See the demo here: http://jsfiddle.net/nLfk1oze/1/Best regards,
Svetoslav BorislavovjQWidgets Team
https://www.jqwidgets.com/Thanks !
Regards
Miche -
AuthorPosts
You must be logged in to reply to this topic.