<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<style>
#chart-panel {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
width: 1000px;
height: 750px;
}
</style>
<script src="./lib/5.5.0/echarts.min.js"></script>
<script src="./lib/liquidfill/3.1.0/echarts-liquidfill.js"></script>
</head>
<body>
<div id="chart-panel"></div>
<!-- 为ECharts准备一个具备大小(宽高)的Dom -->
<script type="text/javascript">
//1、初始化图表对象。
var myChart = echarts.init(document.getElementById('chart-panel'));
//2、图表配置。
let option = {
toolbox: {
feature: {
saveAsImage: {}
}
},
series: [{
type: 'liquidFill',
data: [0.6, 0.5, 0.4, 0.3],
radius: '80%'
}]
};
//3、通过图表对象的setOption方法和图表配置进行关联。
myChart.setOption(option);
</script>
</body>
</html>