AnyChart-Android icon indicating copy to clipboard operation
AnyChart-Android copied to clipboard

sort Y axis in reverse order

Open shiv2810 opened this issue 6 years ago • 5 comments

how Can I sort data of Y axis in need it in reverse order

shiv2810 avatar Jul 16 '19 08:07 shiv2810

@shiv2810 You can use inverted() scale method for this purpose. For most of the chart types you can achieve that like this:

chart.yScale().inverted(true);

Where chart is a variable that stores the chart instance.

Shestac92 avatar Jul 17 '19 03:07 Shestac92

I want to reverse order of digits in y axis as 0-600 on bottom instead of top

shiv2810 avatar Jul 17 '19 07:07 shiv2810

@shiv2810 Does the inverted() method work for you? Or please, provide an example of the desired chart, if I didn't get your idea correctly.

Shestac92 avatar Jul 18 '19 02:07 Shestac92

inverted() method shifted chart from left to right. I have this data and I want to show 0-600 on bottom of y scale. "0-600": 0, "600-650": 3.8, "650-700": 16.2, "700-750": 28.7, "750-800": 40.6, "800-1200": 10.7

shiv2810 avatar Jul 18 '19 08:07 shiv2810

@shiv2810 Are you using a bar chart? Did I get correctly that 0-600 is a X-Axis value? Not Y value

Shestac92 avatar Jul 26 '19 08:07 Shestac92