-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzhu.html
118 lines (112 loc) · 3.26 KB
/
zhu.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>折线图</title>
<link rel="stylesheet" type="text/css" href="../css/reset.css">
<script type="text/javascript" src="highcharts/jquery.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- <script src="https://img.hcharts.cn/jquery/jquery-1.8.3.min.js"></script> -->
<script src="highcharts/highcharts.js"></script>
<script src="highcharts/exporting.js"></script>
<!-- <script src="highcharts-zh_CN.js"></script> -->
<style>
body{
background-color: #000;
}
</style>
<body>
<div id="main" style="width:250px;height:200px;background-color: #000;"></div>
</body>
<script>
$(function () {
var colors = ['#3123AE', '#53D0FC',];
Highcharts.getOptions().colors = Highcharts.map(colors, function (color) {
return {
radialGradient: { cx: 0, cy: 0.8, r: 2.3 },
stops: [[0, color], [2, Highcharts.Color(color).brighten(14).get('rgb')] // darken
]
};
});
$('#main').highcharts({
credits: {
enabled:false
},
plotOptions:{
column:{
borderColor: "",//去边框
shadow: false //去阴影
}
},
exporting:{
enabled:false //用来设置是否显示‘打印’,'导出'等功能按钮,不设置时默认为显示
},
chart: {
type: 'column',
backgroundColor:'rgba(0,0,0,0)',
},
title: {
text: ''
},
subtitle: {
text: ''
},
xAxis: {
type: 'category',
labels: {
rotation: -45,
style: {
color: '#fff',
fontSize: '13px',
fontFamily: 'Verdana, sans-serif'
}
}
},
yAxis: {
min: 0,
title: {
text: '来源数量(个)',
style: {
color:"#fff"
}
},
labels: {
// rotation: -45,
style: {
color: '#fff',
fontSize: '13px',
fontFamily: 'Verdana, sans-serif'
}
}
},
legend: {
enabled: false
},
tooltip: {
pointFormat: '数量: <b>{point.y:.1f} </b>'
},
series: [{
name: '总数量',
data: [
['联通', 124],
['垂直网站', 250],
['门店自留', 351],
['营销活动', 178],
],
dataLabels: {
enabled: false,
rotation: -90,
color: '#FFFFFF',
align: 'right',
format: '{point.y:.1f}', // one decimal
y: 10, // 10 pixels down from the top
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif'
}
}
}]
});
});
</script>
</html>