function Chart() {
//创建Echarts对象
var myEchart = echarts.init(document.getElementById("box"));
var option = {
title: {
text: "Echarts入门",
},
tooltip: {},
dataset: {
source:
['全栈', 1100, 1400 '初中', 10],
['大数据', 900, 300, '高中', 10],
['人工智能', 1000, 1060, '本科', 20],
['测试', 800, 1100, '中专', 30],
]
},
grid: [],
yAxis: [],
xAxis: [{type: 'category'}],
series: [
{type: 'bar', encode: {x: 0, y: 1}},
{type: 'line', encode: {x: 0, y: 2}},
{bottom: '40%', left: '70%', radius: ['10%', '30%'], type: 'pie', encode: {itemName: 3, value: 4}},
]
};
myEchart.setOption(option);
myEchart.resize()
}
window.onload = function () {
Chart()
window.onresize = function () {
Chart()
};
};
echarts三位图 调整位置
最新推荐文章于 2024-02-11 00:00:00 发布