Home Forums Chart Support Custom X Axis Order By (Asc/Desc) Reply To: Custom X Axis Order By (Asc/Desc)



The x-axis labels are auto-calculated and displayed according to the x-values that you have passed in a sequential order (ascending). If you would like to show the x-axis labels in a reverse order (i.e descending order), please take a look at the reversed property of axisX to achieve the same.

As you have mentioned about having custom sequence, you can use labels instead of x-value. Kindly take a look at the code snippet below,

data: [
        type: "column",
        dataPoints: [

        { label: "30", y: 71},
        { label: "20", y: 55},
        { label: "10", y: 50},
        { label: "50", y: 65},
        { label: "40", y: 95},

If the solution doesn’t fit your requirement, kindly brief us further on your requirement so that we can understand it better and help you out with the same.

Adithya Menon
Team CanvasJS