2
votes

I have the following Chart: enter image description here

I want to reverse the x axis to become from 2004 to 2018. Which mean 2016 2014 ... 2006

What I tried to do:

1- Reversed the dataProvider "dataProvider": this.state.historicalData.reverse() But didn't work I got the following Chart: enter image description here

2- I added reversed attribute to valueAxes object in the Amcharts config

  "valueAxes": [{
    "axisAlpha": 0,
    "position": "right",
  },{
    "axisAlpha": 1,
    "reversed": true,
    "position": "bottom",
  }]

But that didn't work because it's a Serial Chart as we mentioned here

So, Any solution instead of changing the chart type to XY?

1

1 Answers

1
votes

Descending dates are not supported in v3 at all in parsed date axes, even in XY charts since it follows the same logic with date-based value axes.

You can either simply not parse dates in your category axis and reverse your data like in your first attempt or use v4, which allows you to render your date axes in descending order.