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.
book/publisher_pie_chart.html

227 lines
7.2 KiB

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Awesome-pyecharts</title>
<script type="text/javascript" src="https://assets.pyecharts.org/assets/v5/echarts.min.js"></script>
</head>
<body >
<div id="f91b113d26d04dc99f3a0df5c9667820" class="chart-container" style="width:900px; height:500px; "></div>
<script>
var chart_f91b113d26d04dc99f3a0df5c9667820 = echarts.init(
document.getElementById('f91b113d26d04dc99f3a0df5c9667820'), 'white', {renderer: 'canvas'});
var option_f91b113d26d04dc99f3a0df5c9667820 = {
"animation": true,
"animationThreshold": 2000,
"animationDuration": 1000,
"animationEasing": "cubicOut",
"animationDelay": 0,
"animationDurationUpdate": 300,
"animationEasingUpdate": "cubicOut",
"animationDelayUpdate": 0,
"aria": {
"enabled": false
},
"color": [
"blue",
"green",
"yellow",
"red",
"purple"
],
"series": [
{
"type": "pie",
"colorBy": "data",
"legendHoverLink": true,
"selectedMode": false,
"selectedOffset": 10,
"clockwise": true,
"startAngle": 90,
"minAngle": 0,
"minShowLabelAngle": 0,
"avoidLabelOverlap": true,
"stillShowZeroSum": true,
"percentPrecision": 2,
"showEmptyCircle": true,
"emptyCircleStyle": {
"color": "lightgray",
"borderColor": "#000",
"borderWidth": 0,
"borderType": "solid",
"borderDashOffset": 0,
"borderCap": "butt",
"borderJoin": "bevel",
"borderMiterLimit": 10,
"opacity": 1
},
"data": [
{
"name": " \u4eba\u6c11\u6587\u5b66\u51fa\u7248\u793e ",
"value": 9
},
{
"name": " \u4f5c\u5bb6\u51fa\u7248\u793e ",
"value": 1
},
{
"name": " \u5317\u4eac\u5341\u6708\u6587\u827a\u51fa\u7248\u793e ",
"value": 1
},
{
"name": " \u91cd\u5e86\u51fa\u7248\u793e ",
"value": 1
},
{
"name": " \u5357\u6d77\u51fa\u7248\u516c\u53f8 ",
"value": 2
},
{
"name": " \u8bd1\u6797\u51fa\u7248\u793e ",
"value": 2
},
{
"name": " \u4e0a\u6d77\u8bd1\u6587\u51fa\u7248\u793e ",
"value": 1
},
{
"name": " \u5317\u4eac\u8054\u5408\u51fa\u7248\u516c\u53f8 ",
"value": 1
},
{
"name": " \u7fa4\u4f17\u51fa\u7248\u793e ",
"value": 1
},
{
"name": " \u751f\u6d3b\u00b7\u8bfb\u4e66\u00b7\u65b0\u77e5\u4e09\u8054\u4e66\u5e97 ",
"value": 2
},
{
"name": " \u54c8\u5c14\u6ee8\u51fa\u7248\u793e ",
"value": 1
},
{
"name": " \u5929\u6d25\u4eba\u6c11\u51fa\u7248\u793e ",
"value": 1
},
{
"name": " \u4e2d\u56fd\u6d77\u5173\u51fa\u7248\u793e ",
"value": 1
},
{
"name": " \u4e2d\u56fd\u9752\u5e74\u51fa\u7248\u793e ",
"value": 1
}
],
"radius": [
"0%",
"75%"
],
"center": [
"50%",
"50%"
],
"label": {
"show": true,
"margin": 8,
"formatter": "{b}: {c}"
},
"labelLine": {
"show": true,
"showAbove": false,
"length": 15,
"length2": 15,
"smooth": false,
"minTurnAngle": 90,
"maxSurfaceAngle": 90
},
"rippleEffect": {
"show": true,
"brushType": "stroke",
"scale": 2.5,
"period": 4
}
}
],
"legend": [
{
"data": [
" \u4eba\u6c11\u6587\u5b66\u51fa\u7248\u793e ",
" \u4f5c\u5bb6\u51fa\u7248\u793e ",
" \u5317\u4eac\u5341\u6708\u6587\u827a\u51fa\u7248\u793e ",
" \u91cd\u5e86\u51fa\u7248\u793e ",
" \u5357\u6d77\u51fa\u7248\u516c\u53f8 ",
" \u8bd1\u6797\u51fa\u7248\u793e ",
" \u4e0a\u6d77\u8bd1\u6587\u51fa\u7248\u793e ",
" \u5317\u4eac\u8054\u5408\u51fa\u7248\u516c\u53f8 ",
" \u7fa4\u4f17\u51fa\u7248\u793e ",
" \u751f\u6d3b\u00b7\u8bfb\u4e66\u00b7\u65b0\u77e5\u4e09\u8054\u4e66\u5e97 ",
" \u54c8\u5c14\u6ee8\u51fa\u7248\u793e ",
" \u5929\u6d25\u4eba\u6c11\u51fa\u7248\u793e ",
" \u4e2d\u56fd\u6d77\u5173\u51fa\u7248\u793e ",
" \u4e2d\u56fd\u9752\u5e74\u51fa\u7248\u793e "
],
"selected": {},
"show": true,
"padding": 5,
"itemGap": 10,
"itemWidth": 25,
"itemHeight": 14,
"backgroundColor": "transparent",
"borderColor": "#ccc",
"borderRadius": 0,
"pageButtonItemGap": 5,
"pageButtonPosition": "end",
"pageFormatter": "{current}/{total}",
"pageIconColor": "#2f4554",
"pageIconInactiveColor": "#aaa",
"pageIconSize": 15,
"animationDurationUpdate": 800,
"selector": false,
"selectorPosition": "auto",
"selectorItemGap": 7,
"selectorButtonGap": 10
}
],
"tooltip": {
"show": true,
"trigger": "item",
"triggerOn": "mousemove|click",
"axisPointer": {
"type": "line"
},
"showContent": true,
"alwaysShowContent": false,
"showDelay": 0,
"hideDelay": 100,
"enterable": false,
"confine": false,
"appendToBody": false,
"transitionDuration": 0.4,
"textStyle": {
"fontSize": 14
},
"borderWidth": 0,
"padding": 5,
"order": "seriesAsc"
},
"title": [
{
"show": true,
"text": "\u51fa\u7248\u5546\u5206\u5e03\u997c\u56fe",
"target": "blank",
"subtarget": "blank",
"padding": 5,
"itemGap": 10,
"textAlign": "auto",
"textVerticalAlign": "auto",
"triggerEvent": false
}
]
};
chart_f91b113d26d04dc99f3a0df5c9667820.setOption(option_f91b113d26d04dc99f3a0df5c9667820);
</script>
</body>
</html>