Is there any way to use the Persian or Arabic calendar in Amcharts trendline?
Months names are not useful, because they conflict with other calendars.
AmCharts Live Editor
I recommend you to make JavaScript file named fa.js with code below in Lang folder which is available in amChart directory.
AmCharts.translations.fa = {
"monthNames": ["دی", "بهمن", "اسفند", "فروردین", "اردیبهشت", "خرداد", "تیر", "مرداد", "شهریور", "مهر", "آبان", "آذز"],
"shortMonthNames": ["دی", "بهمن", "اسفند", "فروردین", "اردیبهشت", "خرداد", "تیر", "مرداد", "شهریور", "مهر", "آبان", "آذز"],
"dayNames": ["یکشنبه", "دوشنبه", "سه شنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه"],
"shortDayNames": ["یکشنبه", "دوشنبه", "سه شنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه"],
"zoomOutText": "نمایش همه"}
Now you have to do couple things more:
Import fa.js to your project
<script type="text/javascript" src="/amcharts/lang/fa.js"></script>
Then define it in amchart object
var chart = AmCharts.makeChart("chartdiv", {
"type": "serial",
"theme": "dark",
"marginRight": 40,
"marginLeft": 40,
"language":"fa"
.
.
.
Unfortunately, you have to regenerate the whole (Persian Sunny) Calendar with the amCharts methods to format or parse dates
You can find the information related to formatting dates on
amCharts Acknowledge Base - Date Formatting
if you could do it please feel free to share it with us
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