Displaying Persian dates in highchart from its corresponding Georgian date

后端 未结 5 1850
迷失自我
迷失自我 2021-02-04 10:30

Can we use Gregorian dates together with a Georgian to Persian date converter script to show Persian dates in Highchart and Highstock?

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-04 10:54

    You can use it babakhani persian date js for example:


    xAxis: {
                        type: 'datetime',
                        labels: {
                            formatter: function () {
                                var date = new Date(this.value);
                                var pdate = persianDate(date);
                                return (pdate.pDate.year - 1300) + "/" + pdate.pDate.month;
                            }
                        }
                    }
    

提交回复
热议问题