I am having the below function which represents X axis of a Chart.
Currently, in this function, 'n' has many iterations which present 0, 25, 50, depending upon the values selected dynamically.
Is there any possibility by which we can know if this is the last iteration of n?
xaxis: {showLabels: true, noTicks: 7,tickFormatter: function(n)
{
var k = n;
if(k==7) // This is not working
return NewdateData[NewdateData.length-1];
else
return NewdateData[k];
}
Reducing your function to a minimum works well comparing
n
withthis.noTicks
:Are you calling it the same way,
... .xaxis.tickFormatter(...)
?