I have a line chart that is updated every so and so seconds, similar to the one you see in Windows’ Task Manager. The chart goes right-to-left, with the most recent data on the right, and going leftwards. How would I invert the values of the X axis so that the lowest value is on the right and the highest on the left? It’s a LinearAxis.
I tried making it a CategoryAxis and putting the numbers in manually, but that doesn’t work the way it should (the labels are not aligned with the ticks).
Or, is there a way to have the labels in a CategoryAxis align with the ticks?
So I’ve looked into it an i also can’t see a straightforward way of flipping the axis. However i do have a solution that would work perfectly well and is relatively elegant giving the omission of a property to do this for you.
So consider this normal left-to-right line chart (should just be able to copy and paste this into a project to test).
To change this to a right-to-left chart, i do some inverting of the time values to make them negative and then plot them along an axis that uses a negative minimum and zero as the maximum. I also then run a function on the labels to make them positive again to fit the original data source.