G2
G2 copied to clipboard
G2 Radar chart using javascript - reverse plotting of values
- G2 Version: 4.1.42
- Platform: windows / mac
- Mini Showcase(like screenshots):

Plotting values in reverse is not working in Antv G2 Radar chart. I am trying to plot chart.scale as min:5, max:1 - so the values in the middle should be 5 and should reduce to 1 when scaling outside. But, trying this in antv g2 chart, the chart is not responding properly and taking random axis values irrespective of given values(only if min value is greater than max value). Much appreciable, if anyone has any idea about this to share.!
Thanks!
Very special situation.
A solution for you, the labels whose from 1.0 to 5.0 are just only text labels.
- process the demo, (x) => 5 - x to reverse the data
- show yaxis label 1.0 with 5.0, and so on
chart.axis('score', {
label: {
formatter: (v) => 5 - v, // here
}
});