You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2018/05/31 01:24:50 UTC

[GitHub] komagic opened a new issue #8428: 如何从api获取某个折线图的折点坐标?我这里有个方法但是不知道有没有更好的

komagic opened a new issue #8428: 如何从api获取某个折线图的折点坐标?我这里有个方法但是不知道有没有更好的
URL: https://github.com/apache/incubator-echarts/issues/8428
 
 
   <!--
   为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。
   -->
   
   如下图所示,我想得到某个点的坐标,除了点击事件,我还可以在源代码上加上一个getposition方法获得:
   echartsProto.getMyPosition=function(finder){
               var ecModel=this._model;
               finder=parseFinder(ecModel,finder,{defaultMainType:'series'});
               var seriesModel=finder.seriesModel;
               if(__DEV__){
                   if(!seriesModel){
                       console.log("NO specified seres model");
                   }
               }
               var data=seriesModel.getData();
               return data;
           }
   
   ### One-line summary [问题简述]
   
   ![666](https://user-images.githubusercontent.com/13415767/40756018-b04243f4-64b3-11e8-9412-a02d7cfc2505.png)
   那么问题来了,我只是希望在折线图末端加上一个箭头,并保证箭头与折现的角度正确,如下图所示,那么请问还有更好的方法吗?
   
   
   ### Version & Environment [版本及环境]
   + ECharts version [ECharts 版本]:3.7.2
   + Browser version [浏览器类型和版本]:chrome
   + OS Version [操作系统类型和版本]:win10
   
   
   
   
   
   ### Expected behaviour [期望结果]
   
   ![uclpahl rftu s h 3to59](https://user-images.githubusercontent.com/13415767/40756088-1481f166-64b4-11e8-931f-6d31b3f576a2.png)
   ![snfj tvkf x wwzqkb_8b](https://user-images.githubusercontent.com/13415767/40756128-4ab2eaec-64b4-11e8-8bde-a742f80e5943.png)
   
   
   
   
   ### ECharts option [ECharts配置项]
   <!-- Copy and paste your 'echarts option' here. -->
   <!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 option。如何得到能运行的 option 参见上方的 guidelines for contributing] -->
   ```javascript
   option = {
   
   }
   
   ```
   
   
   
   
   ### Other comments [其他信息]
   <!-- For example: Screenshot or Online demo -->
   <!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] -->
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org