Home forums Using CanvasJS shamsi date in canvasjs

This topic contains 1 reply, has 2 voices, and was last updated by  Shashi Ranjan 3 weeks, 3 days ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #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 3 weeks, 5 days 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.