How can I set the tickInterval in x-axis for a jqplot.CanvasAxisTickRenderer ? The x-axis labels are strings.
I try the code below, but it does not work. Help please, thanks.
xaxis: {
tickRenderer: $.jqplot.CanvasAxisTickRenderer ,
tickOptions: {
angle: -90,
fontSize: '12pt'
},
tickInterval : 10,
renderer: $.jqplot.CategoryAxisRenderer,
ticks: ticks,
label: '<%= chartBy.replace("_", " ").toUpperCase()%>',
labelOptions:{
enableFontSupport:true,
fontFamily:'Verdana',
fontSize: '12pt'
}
The property tickInterval is a string field. Try setting it like this:
xaxis:{
//Other options
tickInterval: '1 day',
//Another options
}
I've searched another options and these are the ones i've tested (they work):
'1 day' 'x days' where x is any integer greater than 1 '1 week''x weeks' where x is any integer greater than 1 '1 month''x months' where x is any integer greater than 1 Note that these are case-sensitive options. So, 'month' is different than 'Month'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With