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/05/06 02:14:40 UTC

[GitHub] [incubator-echarts] 2675569545 opened a new issue #12569: Graph does not support Datazoom?

2675569545 opened a new issue #12569:
URL: https://github.com/apache/incubator-echarts/issues/12569


   //English problem description
   &emsp;I'm sorry this is a question of how to do it, but I haven't found any examples either on the official echarts documentation or on the Internet. I've tried and failed, so I'm asking for help.
   &emsp;As the title shows, can graph add the component dataZoom.
   &emsp;I wrote an example that would work if I replaced the type of series under option with "scatter".But when series type is “graph”, the page is blank.
   &emsp;**Why would you want to do that?**
   &emsp;I have nearly 10,000 elements to show their relationships, and I can't see anything if I just use the “graph” type. I want to control the display of the data by using the Datazoom.
   &emsp;Can you help me?Thanks in advance. The code Demo is described in Chinese.
   //Chinesse problem description
   &emsp;很抱歉这是一个询问如何做的问题,但是无论在echarts官方文档上还是在因特网上我都没有找到任何实例,自己已经尝试过但是失败了,所以来求助。
   &emsp;如题目所示,关系图(graph)是否可以添加区域缩放组件(dataZoom)
   &emsp;我写了一个示例,如果将option下的series的type改为scatter,效果正常显示。但当他的类型是graph时,页面一片空白
   &emsp;**为什么想这么做?**
   &emsp;我有将近一万个元素要展示他们之间的关系,如果只用关系图将会什么也看不清,我想通过datazoom来控制数据的显示
   &emsp;可以提供一些帮助吗?先行感谢。代码demo在中文描述之后
   `<!DOCTYPE html>
   <html lang="en">
   
   <head>
       <meta charset="UTF-8">
       <meta name="viewport" content="width=device-width, initial-scale=1.0">
       <title>Document</title>
   </head>
   <script src="https://cdn.bootcdn.net/ajax/libs/echarts/4.7.0/echarts-en.common.js"></script>
   
   <body>
       <div id="main" style="width: 600px;height:400px;"></div>
       <p style="color:#fff"></p>
   </body>
   <script type="text/javascript">
   
       var chart_idx = echarts.init(document.getElementById('main'));
   
       var categories = [{ name: "全链关系" }, { name: "影响关系" }, { name: "血缘关系" }, { name: "无关系" }];
       var i = 0;
       var arr = [];
       option = {
           legend: [{
               data: categories.map(function (a) {
                   return a.name;
               })
           }],
           xAxis: {
               type: 'value'
           },
           yAxis: {
               type: 'value',
           },
           tooltip: {
           },
           dataZoom: [
               {
                   type: 'slider',
                   show: true,
                   xAxisIndex: [0],
                   start: 1,
                   end: 35
               },
               {
                   type: 'slider',
                   show: true,
                   yAxisIndex: [0],
                   left: '93%',
                   start: 29,
                   end: 36
               },
               {
                   type: 'inside',
                   xAxisIndex: [0],
                   start: 1,
                   end: 35
               },
               {
                   type: 'inside',
                   yAxisIndex: [0],
                   start: 29,
                   end: 36
               }
           ],
           series: [{
               type: 'scatter',
               layout: 'force',
               animation: false,
               label: {
                   position: 'right',
                   formatter: '{b}'
               },
               draggable: true,
               data: [[8.915, 5.904, 'sss'], [10.688, 3.943, 'wda'], [1.313, 4.302, 'sasa']
                   , [3.981, 5.415, 'asd'], [12.530, 0.663, 'wq'], [6.912, 6.345, 'czx']],
               categories: categories,
               force: {
                   edgeLength: 5,
                   repulsion: 20,
                   gravity: 0.2
               }//,
               // edges: webkitDep.links
           }]
       };
       chart_idx.setOption(option);
   </script>
   
   </html>`


----------------------------------------------------------------
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] [incubator-echarts] echarts-bot[bot] commented on issue #12569: Graph does not support Datazoom?

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


   This issue is not created using [issue template](https://ecomfe.github.io/echarts-issue-helper/) so I'm going to close it. 🙊
   Sorry for this, but it helps save our maintainers' time so that more developers get helped.
   Feel free to create another issue using the issue template.
   
   If you think you have already made your point clear without the template, or your problem cannot be covered by it, you may re-open this issue again.
   
   这个 issue 未使用 [issue 模板](https://ecomfe.github.io/echarts-issue-helper/?lang=zh-cn) 创建,所以我将关闭此 issue。
   为此带来的麻烦我深表歉意,但是请理解这是为了节约社区维护者的时间,以更高效地服务社区的开发者群体。
   如果您愿意,可以请使用 issue 模板重新创建 issue。
   
   如果你认为虽然没有使用模板,但你已经提供了复现问题的充分描述,或者你的问题无法使用模板表达,也可以重新 open 这个 issue。


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