I'm trying to show the number of the week of the year on the xAxis, so this my code but it's not working
$.jqplot('my_canvas' + id, data, {
title: 'Graphic',
xaxis: {
renderer : $.jqplot.DateAxisRenderer,
min: from_date,
label: "WEEK",
tickInterval: '1 week',
tickOptions:{
formatter: Formatter //why formatter is not not being called?
}
},
yaxis: {
min: 0,
max: maximum_value
}
highlighter: {
show: true
}
}
Formatter = function (format, val) {
return numberOftheWeek(val);
}
formatter is not being called when using renderer : $.jqplot.DateAxisRenderer but when i use renderer: $.jqplot.CategoryAxisRenderer. it's called but all the aAxis labels are superimposed.
All help will be greatly appreciated. Thanks!
try this ,not sure whether it works or not:
xaxis: {
renderer:$.jqplot.DateAxisRenderer,
label: "WEEK",
min: from_date,
tickInterval: '1 WEEK',
tickOptions: {formatString:Formatter, markSize: 4},
},
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.