Hi there, I got a kendo chart category axis described like this :
categoryAxis: {
majorGridLines: "none",
type: "date",
field: "Day",
baseUnit: "month",
labels: {
font: "6.25pt Verdana",
rotation: -45,
template: " #= new Date(parseInt(value.substr(6))).getDate() #" + "/" + "#= month[new Date(parseInt(value.substr(6))).getMonth()] #"
},
title: {
}
}
I also got another Kendo chart with category axis liek this :
categoryAxis: {
majorGridLines: "none",
field: "Day",
labels: {
font: "6.25pt Verdana",
rotation: -45,
template: " #= new Date(parseInt(value.substr(6))).getDate() #" + "/" + "#= month[new Date(parseInt(value.substr(6))).getMonth()] #"
},
title: {
}
}
So in the second example everything works fine except I get a date for each point in the chart, so I wanted to make it show only every 1st of the month ( there are 6 months in total). So the first code snippet should do that but i get an error: "Uncaught TypeError: Object [object Date] has no method 'substr' ". I assume I should use some sort of ekndo.dateparse, but im not sure of the syntax of it. Could someone pelase help.
Note that the tooltip shows the date just fine.
Please find a screenshot attached,
Regards,
Neil
categoryAxis: {
majorGridLines: "none",
type: "date",
field: "Day",
baseUnit: "month",
labels: {
font: "6.25pt Verdana",
rotation: -45,
template: " #= new Date(parseInt(value.substr(6))).getDate() #" + "/" + "#= month[new Date(parseInt(value.substr(6))).getMonth()] #"
},
title: {
}
}
I also got another Kendo chart with category axis liek this :
categoryAxis: {
majorGridLines: "none",
field: "Day",
labels: {
font: "6.25pt Verdana",
rotation: -45,
template: " #= new Date(parseInt(value.substr(6))).getDate() #" + "/" + "#= month[new Date(parseInt(value.substr(6))).getMonth()] #"
},
title: {
}
}
So in the second example everything works fine except I get a date for each point in the chart, so I wanted to make it show only every 1st of the month ( there are 6 months in total). So the first code snippet should do that but i get an error: "Uncaught TypeError: Object [object Date] has no method 'substr' ". I assume I should use some sort of ekndo.dateparse, but im not sure of the syntax of it. Could someone pelase help.
Note that the tooltip shows the date just fine.
Please find a screenshot attached,
Regards,
Neil