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 2019/10/18 10:25:43 UTC

[GitHub] [incubator-echarts] Caitingwei opened a new issue #11436: Does GraphGL support the categories attribute?

Caitingwei opened a new issue #11436: Does GraphGL support the categories attribute?
URL: https://github.com/apache/incubator-echarts/issues/11436
 
 
   ### Version
   4.4.0
   
   ### Reproduction link
   [https://codepen.io/caitingwei/pen/dyypgqp?editors=1010](https://codepen.io/caitingwei/pen/dyypgqp?editors=1010)
   
   ### Steps to reproduce
   1. I set the categories and legend when it was initialized, and it was expected to be displayed on the chart,
   2. but when I tried to click on a category, an unknown problem occurred, the points and edges on the graph disappeared and became a node.
   3. Another question is whether graphGL supports setting the zoom level ?
   ```javascript
   const option = {
         calculable: false,
         color: ["rgb(203,239,15)", "rgb(73,15,239)","rgb(15,217,239)","rgb(30,15,239)","rgb(15,174,239)","rgb(116,239,15)","rgb(239,15,58)","rgb(15,239,174)","rgb(239,102,15)","rgb(239,15,15)","rgb(15,44,239)","rgb(239,145,15)","rgb(30,239,15)","rgb(239,188,15)","rgb(159,239,15)","rgb(159,15,239)","rgb(15,239,44)","rgb(15,239,87)","rgb(15,239,217)","rgb(203,15,239)","rgb(239,15,188)","rgb(239,15,102)","rgb(239,58,15)","rgb(239,15,145)","rgb(116,15,239)","rgb(15,131,239)","rgb(73,239,15)","rgb(15,239,131)","rgb(15,87,239)","rgb(239,15,231)"],
         animation: true,
         animationDuration: 1500,
         animationEasingUpdate: 'quinticInOut',
         modularity: {
           resolution: 2,
           sort: true
         },
         legend: [{
           textStyle: {
             color: '#ffffff',
           },
           data: categories.map(a => a.name),
         }],
         series: [
           {
             type: "graphGL",
             name: "TEST_graphGL",
             nodes: graphData.nodes,
             edges: graphData.edges,
             symbolSize: 25,
             draggable: true,
             // symbol: "triangle",
             categories,
             lineStyle: {
               color: "rgba(15,217,239,.7)",
               width: 5,
             },
             roam: true,
             focusNodeAdjacency: true,
             emphasis: {
               label: {
                 show: false
               },
               lineStyle: {
                 opacity: 0.5,
                 width: 4
               }
             },
             forceAtlas2: {
               steps: 5,
               stopThreshold: 20,
               jitterTolerence: 10,
               edgeWeight: [0.2, 1],
               gravity: 5,
               edgeWeightInfluence: 0,
               preventOverlap: true,
             }
           }
         ],
         backgroundColor: "#333333"
       };
   ```
   
   ### What is expected?
   The result is a categories nodes and edges.
   
   ### What is actually happening?
   categories invalid.
   
   ### demo Screenshot
   ![image](https://user-images.githubusercontent.com/24822015/67087001-9c59c380-f1d4-11e9-86a9-1ed59c4cf53e.png)
   ![image](https://user-images.githubusercontent.com/24822015/67087027-ad0a3980-f1d4-11e9-9e1c-e54924464cc3.png)
   
   <!-- 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


With regards,
Apache Git Services

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