Home Forums Chart Support shamsi date in canvasjs

shamsi date in canvasjs

Viewing 2 posts - 1 through 2 (of 2 total)
  • #27166

    how can i use shamsi date(1370/06/31) in option of canvasjs in datePoints

    
    dataPoints: [
    				
    				  { x: new Date("2018-03-02"), y: 83.97},
    				  { x: new Date("2018-03-05"), y: 83.49},
    				  { x: new Date("2018-03-06"), y: 84.16},
    ] 
    • This topic was modified 5 years ago by homayonit.
    #27180

    @homayonit,

    You can convert the JavaScript Date to Shamsi date format using the lines of code as shown in this StackOverflow link. For achieving the same in charts, you can use labelFormatter of axisX and contentFormatter of toolTip as shown in this JSFiddle.

    Considering this as a duplicate of shamsiDate in canvasjs and hence closing the same.


    Shashi Ranjan
    Team CanvasJS

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.