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 2021/05/13 07:13:00 UTC

[GitHub] [echarts] pumpkindev opened a new issue #14935: `echart.convertToPixel({ seriesIndex: 0 }, point)`传入坐标值和返回坐标值相同

pumpkindev opened a new issue #14935:
URL: https://github.com/apache/echarts/issues/14935


   ### Version
   5.0.2
   
   ### Steps to reproduce
   打印`instance.convertToPixel({ seriesIndex: 0 }, [100,100])`返回值是[100,100]
   我通过
   ```
     const series = instance.getModel().getSeriesByIndex(0);
       const itemLayouts = series.getData()._itemLayouts;
   ```
   获取到 graph force中node点的坐标,然后进行保存,下次进来渲染的时候直接用保存的坐标值渲染
   然而获取到的xy值放入graph中发现比例不对
   进而发现`convertToPixel`这个api穿进去任何值,返回出来的值还是原来的值,怀疑是个bug
   
   ### What is expected?
   希望获取到正确的坐标或者得到获取正确坐标的方式
   
   ### What is actually happening?
   `instance.convertToPixel({ seriesIndex: 0 }, [100,100])`返回值是[100,100]
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. 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



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


[GitHub] [echarts] pissang commented on issue #14935: `echart.convertToPixel({ seriesIndex: 0 }, point)`传入坐标值和返回坐标值相同

Posted by GitBox <gi...@apache.org>.
pissang commented on issue #14935:
URL: https://github.com/apache/echarts/issues/14935#issuecomment-847603093


   @pumpkindev @yufeng04  我试了下不是相同的值啊


-- 
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



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


[GitHub] [echarts] yufeng04 commented on issue #14935: `echart.convertToPixel({ seriesIndex: 0 }, point)`传入坐标值和返回坐标值相同

Posted by GitBox <gi...@apache.org>.
yufeng04 commented on issue #14935:
URL: https://github.com/apache/echarts/issues/14935#issuecomment-841976036


   Please provide  a demo to reproduce


-- 
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



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


[GitHub] [echarts] pissang commented on issue #14935: `echart.convertToPixel({ seriesIndex: 0 }, point)`传入坐标值和返回坐标值相同

Posted by GitBox <gi...@apache.org>.
pissang commented on issue #14935:
URL: https://github.com/apache/echarts/issues/14935#issuecomment-847603982


   @pumpkindev 在鼠标缩放后值就不一样了


-- 
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



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


[GitHub] [echarts] yufeng04 edited a comment on issue #14935: `echart.convertToPixel({ seriesIndex: 0 }, point)`传入坐标值和返回坐标值相同

Posted by GitBox <gi...@apache.org>.
yufeng04 edited a comment on issue #14935:
URL: https://github.com/apache/echarts/issues/14935#issuecomment-847575954


   我看了一下,graph 用的坐标系是 view, 这个坐标系里点的坐标就是像素信息,所以使用convertToPixel的时候返回的是同样的值


-- 
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



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


[GitHub] [echarts] pissang edited a comment on issue #14935: `echart.convertToPixel({ seriesIndex: 0 }, point)`传入坐标值和返回坐标值相同

Posted by GitBox <gi...@apache.org>.
pissang edited a comment on issue #14935:
URL: https://github.com/apache/echarts/issues/14935#issuecomment-847603982


   @pumpkindev 在鼠标缩放后值就不一样了。你说的转成 layout: none 会放大应该是因为 echarts 在设置`layout: none`后会自适应到视图大小,这个后面会优化假如是否自适应的配置项


-- 
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



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


[GitHub] [echarts] yufeng04 commented on issue #14935: `echart.convertToPixel({ seriesIndex: 0 }, point)`传入坐标值和返回坐标值相同

Posted by GitBox <gi...@apache.org>.
yufeng04 commented on issue #14935:
URL: https://github.com/apache/echarts/issues/14935#issuecomment-841976036


   Please provide  a demo to reproduce


-- 
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



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


[GitHub] [echarts] pumpkindev commented on issue #14935: `echart.convertToPixel({ seriesIndex: 0 }, point)`传入坐标值和返回坐标值相同

Posted by GitBox <gi...@apache.org>.
pumpkindev commented on issue #14935:
URL: https://github.com/apache/echarts/issues/14935#issuecomment-843220737


   ![image](https://user-images.githubusercontent.com/21173134/118669287-38700480-b828-11eb-93ba-d2771508965c.png)
   demo 在这里
   @yufeng04 
   


-- 
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



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


[GitHub] [echarts] pumpkindev commented on issue #14935: `echart.convertToPixel({ seriesIndex: 0 }, point)`传入坐标值和返回坐标值相同

Posted by GitBox <gi...@apache.org>.
pumpkindev commented on issue #14935:
URL: https://github.com/apache/echarts/issues/14935#issuecomment-843719624


   我想要实现的效果是点击后保持emphasis  adjacency的效果,发现echart目前并不支持这种操作,所以想点击后获取所有点的坐标,将force图例转换成layout:none图例,自定义逻辑,将不相关点颜色变浅,并且使用force图例的坐标,
   发现获取的坐标转换后和转换前相同,导致的效果是点击后图表会整体放大两次


-- 
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



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


[GitHub] [echarts] pumpkindev commented on issue #14935: `echart.convertToPixel({ seriesIndex: 0 }, point)`传入坐标值和返回坐标值相同

Posted by GitBox <gi...@apache.org>.
pumpkindev commented on issue #14935:
URL: https://github.com/apache/echarts/issues/14935#issuecomment-847559219


   这个问题什么时候解决啊?


-- 
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



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


[GitHub] [echarts] pumpkindev commented on issue #14935: `echart.convertToPixel({ seriesIndex: 0 }, point)`传入坐标值和返回坐标值相同

Posted by GitBox <gi...@apache.org>.
pumpkindev commented on issue #14935:
URL: https://github.com/apache/echarts/issues/14935#issuecomment-842875228


   [https://codepen.io/pumpkindev/pen/RwpGQmr](https://codepen.io/pumpkindev/pen/RwpGQmr)
   @yufeng04 


-- 
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



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


[GitHub] [echarts] yufeng04 commented on issue #14935: `echart.convertToPixel({ seriesIndex: 0 }, point)`传入坐标值和返回坐标值相同

Posted by GitBox <gi...@apache.org>.
yufeng04 commented on issue #14935:
URL: https://github.com/apache/echarts/issues/14935#issuecomment-847575954


   我看了一下,graph 用坐标系是 view, 这个坐标系里的点的左边就是像素信息,所以使用convertToPixel的时候返回的是同样的值


-- 
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



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


[GitHub] [echarts] echarts-bot[bot] commented on issue #14935: `echart.convertToPixel({ seriesIndex: 0 }, point)`传入坐标值和返回坐标值相同

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #14935:
URL: https://github.com/apache/echarts/issues/14935#issuecomment-840368161






-- 
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



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


[GitHub] [echarts] pissang removed a comment on issue #14935: `echart.convertToPixel({ seriesIndex: 0 }, point)`传入坐标值和返回坐标值相同

Posted by GitBox <gi...@apache.org>.
pissang removed a comment on issue #14935:
URL: https://github.com/apache/echarts/issues/14935#issuecomment-847603093


   @pumpkindev @yufeng04  我试了下不是相同的值啊


-- 
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



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