highcharts:
x轴内容多了可以左右滑动,加 navigator与scrollbar为ture
chart: {
panning: true
},
显示破折号风格
yAxis: {
gridLineDashStyle: 'longdash',//破折号风格
lineWidth: 1,//显示左侧刻度线
gridLineWidth: 0,//去掉刻度线
tickInterval:1, // 刻度值
}
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'//详细内容
},
//柱状图上方显示数据
plotOptions: {
line: {
dataLabels: {
// 开启数据标签
enabled: true
},
// 关闭鼠标跟踪,对应的提示框、点击事件会失效
enableMouseTracking: true
}
}
//设置该图标
legend: {
enabled: true,//图标注释
floating: true,//使图标浮动
// x: 200,
y: -300,
},
sliced: true,
selected: true//突出显示
//X轴设置
xAxis: {
lineWidth: 1,
lineColor: "#1a96ef",
tickWidth: 0,
labels: {
y: 20, //x轴刻度往下移动20px
style: {
color: '#19a0f5',//颜色
fontSize:'14px' //字体
}
},
categories: ['One','Two','three'],
// tickPositions: ['0', '1(亿元)','2(亿元)', '3(亿元)','4(亿元)','5(亿元)','6(亿元)','7(亿元)','8(亿元)','9(亿元)','10(亿元)'],
},
//Y轴设置
yAxis: {
min: 0,//显示Y轴最小刻度线
max: 10,//显示Y轴刻度值
labels: {
rotation: -0, // 设置轴标签旋转角度
style: {
color: '#19a0f5',//颜色
fontSize:'18px' //字体
},
formatter:function (){
return this.value + '(亿元)' ;//y轴单位/刻度 自定义
}
},
title: {
text: ''
},
},