echartslegend图标
时间: 2023-09-20 11:14:51 浏览: 71
echarts图标
Echarts的legend图标是使用矢量路径绘制的。在Echarts的配置中,可以通过设置legend的icon属性来定义图标的形状。常见的定义方式是使用路径字符串,以path://开头,后面跟着具体的路径描述。比如:
```javascript
legend: {
icon: 'path://M78.625,93.094L66.494,72.081l12.132-21.013h24.264l12.132,21.013l-12.132,21.013H78.625z M95.547,80.377l4.79-8.296 l-4.79-8.296h-9.579l-4.79,8.296l4.79,8.296H95.547z'
}
```
这个路径描述定义了一个图标的形状,可以通过调整路径来改变图标的样式。同时,Echarts还支持在其他组件中使用矢量路径绘制图标,比如滚动条的handle.icon和工具栏的toolbox.icon等。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [echarts 饼图legend点击不置灰](https://blog.csdn.net/elia1208/article/details/127206282)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [[echarts] legend icon 自定义的几种方式](https://blog.csdn.net/qq_14993591/article/details/130566453)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文