var script document createElement script script type text javascript script src https cdnjs cloudflare com ajax libs echarts 4 1 0 echarts en common min js document head appendChild script let div document createElement div document body appendChild div div id main div style width 400pt div style height 400pt document body style height 400pt script onload function var chartDom document getElementById main console log chartDom var myChart echarts init chartDom const option title Text ECharts Statistics tooltip legend Data user source xAxis data Android IOS PC Ohter yAxis series Name visits type line data 500 200 360 100 myChart setOption option end onload console log running var script document createElement script script type text javascript script src https cdnjs cloudflare com ajax libs echarts 4 1 0 echarts en common min js document head appendChild script let div document createElement div document body appendChild div div id main div style width 400pt div style height 400pt document body style height 400pt script onload function var chartDom document getElementById main console log chartDom var myChart echarts init chartDom const option title Text ECharts Statistics series Name visits type pie radius 60 data value 500 name Android value 200 name IOS value 360 name PC value 100 name Ohter myChart setOption option end onload console log running var script document createElement script script type text javascript script src https cdnjs cloudflare com ajax libs echarts 4 1 0 echarts en common min js document head appendChild script let div document createElement div document body appendChild div div id main div style width 400pt div style height 400pt document body style height 400pt script onload function var chartDom document getElementById main console log chartDom var myChart echarts init chartDom const option title Text ECharts Statistics series Name visits type pie radius 60 data value 500 name Android value 200 name IOS value 360 name PC value 100 name Ohter itemStyle shadowBlur 200 offset in the horizontal direction of the shadow shadowOffsetX 0 offset in the vertical direction of the shadow shadowOffsetY 0 shadow color shadowColor rgba 0 0 0 0 5 myChart setOption option end onload console log running var script document createElement script script type text javascript script src https cdnjs cloudflare com ajax libs echarts 4 1 0 echarts en common min js document head appendChild script let div document createElement div document body appendChild div div id main div style width 400pt div style height 400pt document body style height 400pt script onload function var chartDom document getElementById main console log chartDom var myChart echarts init chartDom const option title Text ECharts Statistics legend Data visits users xAxis data Android IOS PC Other yAxis series Name visits type bar data 180 420 333 83 Name user amount type bar data 125 330 230 60 myChart setOption option end onload console log running add click notifications when the user is selecting some data click on the bar chart values var script document createElement script script type text javascript script src https cdnjs cloudflare com ajax libs echarts 4 1 0 echarts en common min js document head appendChild script let div document createElement div document body appendChild div div id main div style width 400pt div style height 400pt document body style height 400pt script onload function var chartDom document getElementById main console log chartDom var myChart echarts init chartDom const option title Text ECharts Statistics legend Data visits users xAxis data Android IOS PC Other yAxis series Name visits type bar data 180 420 333 83 Name user amount type bar data 125 330 230 60 myChart setOption option myChart on click function params console log params name on end onload console log running open a new window when selected to get further information click on the chart values to test var script document createElement script script type text javascript script src https cdnjs cloudflare com ajax libs echarts 4 1 0 echarts en common min js document head appendChild script let div document createElement div document body appendChild div div id main div style width 400pt div style height 400pt document body style height 400pt script onload function var chartDom document getElementById main console log chartDom var myChart echarts init chartDom var option xAxis Data shirt sweater chiffon shirt trousers high heels socks yAxis series Name sales type bar data 5 20 36 10 10 20 myChart setOption option myChart on click function params window open https www google com search q encodeURIComponent params name end onload console log running
n div style width 400pt div style height 400pt document body style height 400pt script onload function var chartDom document getElementById main console log chartDom var myChart echarts init chartDom const option title Text ECharts Statistics legend Data visits users xAxis data Android IOS PC Other yAxis series Name visits type bar data 180 420 333 83 Name user amount type bar data 125 330 230 60 myChart setOption option end onload console log running add click notifications when the user is selecting some data click on the bar chart values var script document createElement script script type text javascript script src https cdnjs cloudflare com ajax libs echarts 4 1 0 echarts en common min js document head appendChild script let div document createElement div document body appendChild div div id main div style width 400pt div style height 400pt document body style height 400pt script onload function var chartDom document getElementById main console log chartDom var myChart echarts init chartDom const option title Text ECharts Statistics legend Data visits users xAxis data Android IOS PC Other yAxis series Name visits type bar data 180 420 333 83 Name user amount type bar data 125 330 230 60 myChart setOption option myChart on click function params console log params name on end onload console log running open a new window when selected to get further information click on the chart values to test var script document createElement script script type text javascript script src https cdnjs cloudflare com ajax libs echarts 4 1 0 echarts en common min js document head appendChild script let div document createElement div document body appendChild div div id main div style width 400pt div style height 400pt document body style height 400pt script onload function var chartDom document getElementById main console log chartDom var myChart echarts init chartDom var option xAxis Data shirt sweater chiffon shirt trousers high heels socks yAxis series Name sales type bar data 5 20 36 10 10 20 myChart setOption option myChart on click function params window open https www google com search q encodeURIComponent params name end onload console log running