Can we use Gregorian dates together with a Georgian to Persian date converter script to show Persian dates in Highchart
and Highstock
?
Then better way to override date formating is to use Highcharts.dateFormats
(and persianDate library), This allows conversion of all dates (not x or y axis) to Persian calendar.
Sample: http://jsfiddle.net/smpaB/1/
Add pesianDate library with:
And configure highcharts with:
Highcharts.dateFormats = {
'a': function(ts){return new persianDate(ts).format('ffffdd')},
'A': function(ts){return new persianDate(ts).format('ffffdd')},
'd': function(ts){return new persianDate(ts).format('DD')},
'e': function(ts){return new persianDate(ts).format('D')},
'b': function(ts){return new persianDate(ts).format('MMMM')},
'B': function(ts){return new persianDate(ts).format('MMMM')},
'm': function(ts){return new persianDate(ts).format('MM')},
'y': function(ts){return new persianDate(ts).format('YY')},
'Y': function(ts){return new persianDate(ts).format('YYYY')},
'W': function(ts){return new persianDate(ts).format('ww')}
};