Code Monkey home page Code Monkey logo

Comments (3)

plainheart avatar plainheart commented on August 22, 2024

感谢反馈。首先,目前 ECharts 的饼图的 center 只是屏幕坐标,无法识别具体的经纬度,所以你传入的 item.coord 会被当作屏幕坐标而显示在左上角。正确的写法应该是转换经纬度为具体的屏幕坐标,然后再赋值给饼图系列的 center
参考示例:https://codepen.io/plainheart/pen/GRQNyoJ

from echarts-extension-amap.

shuaiwu95 avatar shuaiwu95 commented on August 22, 2024

感谢反馈。首先,目前 ECharts 的饼图的 center 只是屏幕坐标,无法识别具体的经纬度,所以你传入的 item.coord 会被当作屏幕坐标而显示在左上角。正确的写法应该是转换经纬度为具体的屏幕坐标,然后再赋值给饼图系列的 center。 参考示例:https://codepen.io/plainheart/pen/GRQNyoJ

感谢作者回复,我最终就是按这个思路解决的。因为百度地图支持传经纬度,所以我才来问问滴。

from echarts-extension-amap.

plainheart avatar plainheart commented on August 22, 2024

@Hulalalalala 你确定百度地图扩展可以直接传经纬度而无需转换吗?这两个扩展的实现方式是类似的,理论上都是需要提前转换为像素坐标的。

from echarts-extension-amap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.