echarts Invert y-axis when plotting on geo

0ve6wy6x  于 2022-11-02  发布在  Echarts
关注(0)|答案(2)|浏览(158)

What problem does this feature solve?

We are plotting points with a geo svg that contains an <image> of a fictional map. Our data is created using the cartesian coordinate system (x-axis values increase from left to right and y-axis values increase from bottom to top). However, because we are using the geo coordinate system (y-axis values increase from top to bottom), the data points appear to be flipped vertically compared to the map image. Here is a simple example: https://codesandbox.io/s/echarts-geo-boundingcoords-ybbuy?file=/src/index.js

Is there some way to apply some setting similar to yAxis.inverse (https://echarts.apache.org/en/option.html#yAxis.inverse) for the geo coordinate system?

What does the proposed API look like?

Perhaps an option called geo.invert which can be 'x' , 'y' or 'xy' .

wb1gzix0

wb1gzix01#

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that it containsa minimum reproducible demoand necessaryimagesto illustrate. Otherwise, our committers will ask you to do so.

  • A minimum reproducible demo* should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.

You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org . Please attach the issue link if it's a technical question.

If you are interested in the project, you may also subscribe to our mailing list .

Have a nice day! 🍵

kxkpmulp

kxkpmulp2#

Currently changing labels in SVG seems to be a simpler solution. If we add some configuration like invert and the SVG is flipped. The data will also be flipped if we design it like yAxis.inverse

相关问题