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:
<script src="http://rawgithub.com/babakhani/PersianDate/master/dist/persian-date.min.js"></script>
And configure highcharts with:
Highcharts.dateFormats = {
'a': function(ts){return new persianDate(ts).format('dddd')},
'A': function(ts){return new persianDate(ts).format('dddd')},
'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')}
};
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