You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2020/02/17 17:19:21 UTC

[GitHub] [incubator-echarts] travis1111 opened a new issue #12163: 如何把坐标写到options 里面去

travis1111 opened a new issue #12163: 如何把坐标写到options 里面去
URL: https://github.com/apache/incubator-echarts/issues/12163
 
 
   ### What problem does this feature solve?
   提供方法把力矢量布局后的x y 坐标写到 options 里面去。
   
   我的project 里面需要保存布局好了x y 坐标。这个issue 里面提供了参考:
   
   https://github.com/apache/incubator-echarts/issues/11807
   
   https://github.com/apache/incubator-echarts/blob/master/src/chart/graph/forceLayout.js#L116 
   
   现在我能拿到x y 坐标,但是不知道怎么才能把坐标写到options 里面。
   
   谢谢!
   
   ### What does the proposed API look like?
   暂时没有
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #12163: 如何把坐标写到options 里面去

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #12163: 如何把坐标写到options 里面去
URL: https://github.com/apache/incubator-echarts/issues/12163#issuecomment-587091530
 
 
   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 **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) 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 questions.
   
   If you are interested in the project, you may also subscribe our [mail list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] Ovilia commented on issue #12163: 如何把坐标写到options 里面去

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #12163: 如何把坐标写到options 里面去
URL: https://github.com/apache/incubator-echarts/issues/12163#issuecomment-590023523
 
 
   可以通过 getOption 获得计算后的坐标吗?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] travis1111 commented on issue #12163: 如何把坐标写到options 里面去

Posted by GitBox <gi...@apache.org>.
travis1111 commented on issue #12163: 如何把坐标写到options 里面去
URL: https://github.com/apache/incubator-echarts/issues/12163#issuecomment-587366166
 
 
   谢谢。
   
   `forceLayout.js` 里面的这里吗?https://github.com/apache/incubator-echarts/blob/da128eb116f47bb10e31bbdc075605be4f3616b8/src/chart/graph/forceLayout.js#L36
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] travis1111 edited a comment on issue #12163: 如何把坐标写到options 里面去

Posted by GitBox <gi...@apache.org>.
travis1111 edited a comment on issue #12163: 如何把坐标写到options 里面去
URL: https://github.com/apache/incubator-echarts/issues/12163#issuecomment-589579756
 
 
   @Ovilia 可能我没有说明白。初次调用的时候我不知道布局后的坐标,只能靠echarts 做布局。在源码这里:
   
   https://github.com/apache/incubator-echarts/blob/master/src/chart/graph/forceLayout.js#L116
   
   第116行,当finish是true的时候,只布局完成后的坐标,但是我想知道的是怎么在这个源代码里面把这个布局好以后的坐标传到 option 里面去,这样,我可以把坐标保存下来,下次再显示的时候我就有坐标了。
   
   谢谢
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] travis1111 commented on issue #12163: 如何把坐标写到options 里面去

Posted by GitBox <gi...@apache.org>.
travis1111 commented on issue #12163: 如何把坐标写到options 里面去
URL: https://github.com/apache/incubator-echarts/issues/12163#issuecomment-589579756
 
 
   @Ovilia 可能我没有说明白。调用的时候我不知道布局后的坐标,只能靠echarts 做布局。在源码这里:
   
   https://github.com/apache/incubator-echarts/blob/master/src/chart/graph/forceLayout.js#L116
   
   我可以知道动态布局后的坐标,但是我想知道的是怎么把这个布局好以后的坐标传到 option 里面去,这样,我可以把坐标保存下来,下次再显示的时候我就有坐标了。
   
   谢谢
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] Ovilia commented on issue #12163: 如何把坐标写到options 里面去

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #12163: 如何把坐标写到options 里面去
URL: https://github.com/apache/incubator-echarts/issues/12163#issuecomment-587261961
 
 
   Set [layout](https://echarts.apache.org/zh/option.html#series-graph.layout) to be `'none'` and pass `x` and `y` in [data](https://echarts.apache.org/zh/option.html#series-graph.data.x).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] Ovilia commented on issue #12163: 如何把坐标写到options 里面去

Posted by GitBox <gi...@apache.org>.
Ovilia commented on issue #12163: 如何把坐标写到options 里面去
URL: https://github.com/apache/incubator-echarts/issues/12163#issuecomment-589486455
 
 
   @travis1111 我说的是你调用的时候设置的,跟源码没关系。看这个例子https://echarts.apache.org/examples/zh/editor.html?c=graph-simple

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] travis1111 commented on issue #12163: 如何把坐标写到options 里面去

Posted by GitBox <gi...@apache.org>.
travis1111 commented on issue #12163: 如何把坐标写到options 里面去
URL: https://github.com/apache/incubator-echarts/issues/12163#issuecomment-591321552
 
 
   Thanks
   
   通过这个可以知道
   
   ```sh
   var series = chart.getModel().getSeriesByIndex(0);
       var itemLayouts = series.getData()._itemLayouts;
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] travis1111 edited a comment on issue #12163: 如何把坐标写到options 里面去

Posted by GitBox <gi...@apache.org>.
travis1111 edited a comment on issue #12163: 如何把坐标写到options 里面去
URL: https://github.com/apache/incubator-echarts/issues/12163#issuecomment-589579756
 
 
   @Ovilia 可能我没有说明白。初次调用的时候我不知道布局后的坐标,只能靠echarts 做布局。在源码这里:
   
   https://github.com/apache/incubator-echarts/blob/master/src/chart/graph/forceLayout.js#L116
   
   第116行,当finish是true的时候,是布局完成后的坐标,但是我想知道的是怎么在这个源代码里面把这个布局好以后的坐标传到 option 里面去,这样,我可以把坐标保存下来,下次再显示的时候我就有坐标了。
   
   谢谢
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] travis1111 closed issue #12163: 如何把坐标写到options 里面去

Posted by GitBox <gi...@apache.org>.
travis1111 closed issue #12163: 如何把坐标写到options 里面去
URL: https://github.com/apache/incubator-echarts/issues/12163
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org