Customizing tick colors

1,507 views
Skip to first unread message

Adastra

unread,
Mar 21, 2011, 12:11:15 PM3/21/11
to jqplot-users
I'm trying to customize the colors of my ticks on the x and y axis.
Simple solutions like tickOptions: {fontColor: "#000000"} or
tickOptions: {color: "#000000"} didn't work, so I changed the colors
in the CSS file. However, now that I'm using tickOptions: {angle:
-90}, the tick color is back to the default gray, and I can't figure
out how to change it. I'd like the tick color to be consistent with
the rest of my layout, the gray doesn't work at all on my background
color. How can I change it?

Rolf van der Vleuten

unread,
Apr 13, 2011, 3:41:48 AM4/13/11
to jqplot-users
Yes, you can do that in the tickOptions

the textColor attribute defines the color of the tick along the axis
the tickOptions apply to.

axes: {
xaxis: {
renderer:$.jqplot.DateAxisRenderer,
min:'August 1, 2007',
tickInterval: '4 months',
tickOptions:{formatString:'%Y/%#m/%#d', textColor :
'#ffffff'}
},
yaxis: {
renderer: $.jqplot.LogAxisRenderer,
tickInterval:'50',
tickOptions:{formatString:'$%.2f', textColor : '#ffffff'}
Reply all
Reply to author
Forward
0 new messages