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 2019/06/04 02:47:31 UTC

[GitHub] [incubator-echarts] MengXinAlex opened a new issue #10612: 实现直方图缩放并与散点图拼接,直方图无法横向摆放 Achieving the datazoom of hist that connecting with scatter diagram

MengXinAlex opened a new issue #10612: 实现直方图缩放并与散点图拼接,直方图无法横向摆放 Achieving the datazoom of hist that connecting with scatter diagram
URL: https://github.com/apache/incubator-echarts/issues/10612
 
 
   ### Version
   4.2.1
   
   ### Steps to reproduce
   主要的想法是实现seaborn.jointplot(google搜索图片:seaborn.jointplot)类似的散点图与两个直方图的拼接,直方图的实现参考:https://echarts.baidu.com/blog/2017/05/08/echarts-histogram-tutorial.html
   
   这篇文章里面将x轴与y轴的 type 设为 value, 后通过ecStat.histogram() 插件获取直方图数据。
   
   通过这种方法, 与x轴平行的直方图勉强实现,但是有bug,出现了缩放到最大时柱子不会适应性调节宽度,反而会柱子重叠在一起, barCategoryGap失效
   
   在制作与y轴平行的直方图时遇到了由于x,y轴type都为value, 导致无法画出横向直方图。通过简单粗暴的旋转90度以后,发现即使这样实现了横向直方图,也无法正确的将散点图与横向直方图连接起来(echarts.connect()),因为此时横向坐标轴的x轴应该与散点图的y轴相对应,connect无法实现x轴与y轴的连接。 
   
   表面光鲜亮丽:
   <img width="1186" alt="屏幕快照 2019-06-04 下午12 38 07" src="https://user-images.githubusercontent.com/46865258/58847320-e038aa00-86c5-11e9-9203-8b8c99e16f00.png">
   将x轴datazoom拖到最大时,出现的bug:
   <img width="1020" alt="屏幕快照 2019-06-04 下午12 41 11" src="https://user-images.githubusercontent.com/46865258/58847395-255cdc00-86c6-11e9-8712-86f8cffa0a6e.png">
   右侧的直方图为暴力旋转而来,y轴的datazoom还并没有与右边的直方图连上。
   
   ### What is expected?
   实现seaborn.jointplot的进阶动态版,两张直方图与一张散点图的拼接,既实现tooltip,x轴和y轴 还分别有一个datazoom,分别控制对应坐标轴上两张图的缩放。
   
   ### What is actually happening?
   目前遇到的问题:
   
   1. 缩放直方图时出现bug,柱子重叠,barCategoryGap失效,柱子越出坐标轴
   2. 制作横向直方图时,由于x,y坐标轴type都为value, 无法画出横向直方图
   3. 如果第二个问题没有办法解决,echarts是否能够将一张图的x轴与另一张图的y轴在datazoom上建立联系?
   
   ---
   代码实现起来不难,按照连接步骤就能实现,主要问题在于是否能实现横向直方图,如果不能,能否实现一张图的x轴与另一张图的y轴相连接,并且解决柱状图柱子的重叠。现在代码有点乱,如果有需要的话我再贴出来吧。
   
   Sorry I was lazy to explain this task again in English (or maybe lack of skill).  if you are English-only and facing the same problem, inform me so I will translate for you.
   
   <!-- 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: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org