'ChartJS data on x axis and y axis not matching

Good Morning. I am trying to draw chart using chartJS where on "x axis - Days of Month" and on "Y axis - total amount". I able to get Days of Months on x axis and for y axis got the total amount. Now i want to show total amount of particular date on same date on x axis. So how can i can compare date on x and y axis and show data.

Say On "X axis" data is 1 Feb, 2 Feb, 3 Feb, ...... 28 Feb and On "Y axis" total amount data is = "100" for 2 Feb ,"200" for 4 Feb,"300".... But while drawing the chart, 200 shows on 1 Feb, 300 for 2 Feb ... Which is wrong.

I hope my question is clear. Thanks in Advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source