var chart = Highcharts.chart('container', {
title: {
text: ''
},
credits:{ enabled: false },//
隐藏网站
subtitle: {
text: ''
},
yAxis: {
title: {
text: ''
}
},
xAxis: {
tickWidth:0,//
隐藏刻度线
categories: ['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'] //
指定x轴分组
},
legend: {
layout: 'vertical',
//图例是竖排(vertical)还是横排(horizontal,这是默认的)
align: 'center',
//水平位置
verticalAlign: 'top'
//垂直位置
},
plotOptions: {
series: {
label: {
connectorAllowed: false
}
}
},
series: [{
color:'#4a91e3',
name: '播放量',
data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175, 57177, 69658, 97031, 119931, 119931, 137133, 154175, 57177, 69658, 69658, 97031, 119931, 137133, 154175, 57177, 69658, 97031, 119931, 119931, 137133, 154175, 57177, 69658]
}, {
color:'#c474c8',
//单个设置颜色
name: '评论数',
data: [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111, 5948, 8105, 11248, 8989, 11816, 18274, 18111, 5948, 8105, 11248, 8989, 11816, 18274, 18111, 5948, 8105, 11248, 8989, 11816, 18274, 18111, 5948, 8105]
}],
responsive: {
rules: [{
condition: {
maxWidth: 500
},
chartOptions: {
legend: {
layout: 'horizontal',
align: 'center',
verticalAlign: 'bottom'
}
}
}]
}
});