Sorting of second array of x-axis in a single trace is not working

The input we give to the plot :

x:[
x1 [ “1”, “1”, “2”, “2”, “3”, “3”, “4”, “5”, “5”, “6”, “6”, “7”, “7”, “7”, “7”, “7”, “7”, “7”, “7”, “7”, “7”, “7”, “7”, “7”, “7”, “7”, “8” ],
x2 [ “23”, “24”, “23”, “24”, “23”, “24”, “24”, “23”, “24”, “23”, “24”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”, “9”, “10”, “11”, “12”, “13”, “23”, “24”, “24” ]
]

the corresponding X2s of X1:7 are already sorted but when it reaches to Plotly, it got rearranged automatically.