You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
<!DOCTYPE html>
< html >
< head >
< meta charset = "utf-8" >
< title > ECharts< / title >
<!-- 引入 echarts.js -->
<!-- 这里是加载刚下好的echarts.min.js, 注意路径 -->
< script src = "{{url_for('static', filename='echarts.min.js') }}" > < / script >
< / head >
< body >
<!-- 为ECharts准备一个具备大小( 宽高) 的Dom -->
< h2 > ECharts图例演示< / h2 >
< div id = "main" style = "width: 1000px;height:600px;" > < / div >
< script type = "text/javascript" >
// 基于准备好的dom, 初始化echarts实例
var myChart = echarts . init ( document . getElementById ( 'main' ) ) ;
var option = {
backgroundColor : '#2c343c' ,
textStyle : {
color : 'rgba(255, 255, 255, 0.3)'
} ,
series : [
{
name : '访问来源' ,
type : 'pie' ,
radius : '55%' ,
data : [
{ value : 400 , name : '搜索引擎' } ,
{ value : 335 , name : '直接访问' } ,
{ value : 310 , name : '邮件营销' } ,
{ value : 274 , name : '联盟广告' } ,
{ value : 235 , name : '视频广告' }
] ,
roseType : 'angle' ,
itemStyle : {
emphasis : {
shadowBlur : 200 ,
shadowColor : 'rgba(0, 0, 0, 0.5)'
}
} ,
label : {
normal : {
textStyle : {
color : 'rgba(255, 255, 255, 0.3)'
}
}
} ,
labelLine : {
normal : {
lineStyle : {
color : 'rgba(255, 255, 255, 0.3)'
}
}
}
}
]
}
// 使用刚指定的配置项和数据显示图表。
myChart . setOption ( option ) ;
< / script >
< / body >
< / html >