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/05/30 02:29:50 UTC

[GitHub] [incubator-echarts] topvis opened a new issue #10584: graph图中可以为每个node和edge定义cursor类型

topvis opened a new issue #10584: graph图中可以为每个node和edge定义cursor类型
URL: https://github.com/apache/incubator-echarts/issues/10584
 
 
   ### What problem does this feature solve?
   在当前版本4.2.1中,cursor的定义是在node和edge之外的,因此无法为每个node和edge分别定义cursor的类型。
   
   在某些应用场景下,会希望有些node或者edge是可以点击的,有些是不可以点击的。如果可以为每个node和edge分别定义cursor的类型的话,则可以将可以点击的node/edge的cursor设置为pointer,将不可以点击的node/edge的cursor设置为default。
   
   一个具体的例子如下:
   用graph图实现一个文档批准流程。流程中有三个状态(nodes):草稿,已提交和已批准。当前状态是”草稿“。则只有”提交“这个动作(edge)是可行的,即可点击的,比如点击之后显示一个确认对话框,确认是否提交。而另外一个动作”批准“在当前状态下是不可行的,即不可点击的。
   ![image](https://user-images.githubusercontent.com/5996531/58603750-78005780-82c4-11e9-8be6-9378ea996751.png)
   
   
   ### What does the proposed API look like?
   期望在graph图的option中的lineStyle和itemStyle加入cursor的属性定义。
   ```Javascript
   lineStyle: {
     normal: {
       width: 5,
       curveness: 0.2,
       cursor: 'default', // 或者其他需要的cursor类型
     }
   }
   ```
   
   <!-- 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