🚀 Gen 5 of the leading AI app deployment platform launches October 6. Click for the livestream.

Negative range below 0 and change x axis baseline to lowest value

Hi I am trying to create a chart with a negative range from -150 to -50, note that -150 is lower than -50, so drawing from -150 a x value of -120 would have a shorter bar than -100 for instance, the bars should draw from left to right similar to the expected chart provided in the image.

Providing an example of what i have https://jsfiddle.net/esjpv7yx/2/

I have gone thru the forum but have not seen any solutions to this issue, also spent a lot of time with the plotly reference and settings, but have not been able to get the desired result,

hoping someone can provide a solution, thanks, sunil.

Try using base

etienne, thanks I was trying that before, what i ended up doing was that if the x values i got were like 40, 50 i inverted them and displayed as 60, 50 to get the result i wanted.

what i was looking for was plotly to draw it correctly without me having to do that, anyway, problem solved, thanks, you can close this.