Angularjs   发布时间:2022-04-20  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了echarts 3.0 使用自定义图标大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

原来的模样:

使用自定义的图标之后:

感觉立即高大上了,这里的图标使用的是http://www.easyicon.net/,像素128px,图标的大小可以在echarts的option中设置:

var option = {
    title: {
        text: 'Graph 简单示例'
    },tooltip: {},animationDurationupdate: 1500,animationEasingupdate: 'quinticInOut',series : [
        {
            type: 'graph',layout: 'none',symbolSize: 50,//设置图标显示大小
            roaR_323_11845@: true,label: {
                normal: {
                    show: true,position: 'bottom'
                }
            },edgeSymbol: ['circle','arrow'],edgeSymbolSize: [4,10],edgeLabel: {
                normal: {
                    textStyle: {
                        fontSize: 20
                    }
                }
            },data: this.graphData.nodes,links: this.graphData.links,linestyle: {
                normal: {
                    opacity: 0.9,width: 2,curveness: 0
                }
            }
        }
    ]
};

nodes和links数据:

{
  "nodes": [
    {
      "name": "source1","x": 20,"y": 300,"symbol": "image://src/Meta-data/semantic-analysis/img/png/database_folder.png"
    },{
      "name": "source2","y": 200,{
      "name": "source3","y": 400,{
      "name": "table1","x": 150,"symbol": "image://src/Meta-data/semantic-analysis/img/png/table_windows.png"
    },{
      "name": "table2",{
      "name": "table3",{
      "name": "transform1","x": 350,"symbol": "image://src/Meta-data/semantic-analysis/img/png/batch_process.png"
    },{
      "name": "table4","x": 550,"symbol": "image://src/Meta-data/semantic-analysis/img/png/table_windows.png"
    }
  ],"links": [
    {
      "source": "source1","target": "table1"
    },{
      "source": "source2","target": "table2"
    },{
      "source": "source3","target": "table3"
    },{
      "source": "table1","target": "transform1"
    },{
      "source": "table2",{
      "source": "table3",{
      "source": "transform1","target": "table4"
    }
  ]
}

大佬总结

以上是大佬教程为你收集整理的echarts 3.0 使用自定义图标全部内容,希望文章能够帮你解决echarts 3.0 使用自定义图标所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。