【发布时间】:2016-11-08 17:19:31
【问题描述】:
如何格式化如图所示的柱形图数据标签,只需要格式化第二条。
我尝试过的代码如下所示
[$('#voo-accepted-orders-graph').highcharts({
chart: {
type: 'column',
backgroundColor: '#9a97de',
minPadding: 0.08,
maxPadding: 0.08,
},
title: {
text: ''
},
legend: {
enabled: false,
},
exporting: {
enabled: false
},
credits: {
enabled: false
},
xAxis: {
tickWidth: 0,
gridLineWidth: 0,
gridLineColor: "#5c6bc0",
categories: \['accepted', 'auto-accept', 'sent to PO', 'transfers'\],
labels: {
style: {
color: '#ffffff',
fontFamily: "Avenir LT std light",
fontSize: "12px",
zIndex: 1000
}
}
},
yAxis: {
allowDecimals: false,
title: {
text: ''
},
gridLineWidth: 0,
labels: {
enabled: false
},
min: 0,
tickInterval: 20,
},
tooltip: {
pointFormat: '{series.name} <b>{point.y:,.0f}</b><br/>'
},
plotOptions: {
column: {
color: '#8381cc',
borderColor: '#8381cc',
},
series: {
borderWidth: 0,
dataLabels: {
enabled: true,
zIndex: 10,
color: "#fff",
style: {
textShadow: false,
fontWeight: "normal",
}
}
}
},
series: \[{
name: 'orders',
data: \[200, 72, 36, 15\]
}, {
name: 'price',
data: \[90, 150, 120, 50\]
}\]
});][1]
还有 1. 只需要格式化第二条。 2.有没有可能得到垂直线。
【问题讨论】:
-
能否将您提到的图片添加到您的问题中?它将帮助以后阅读此页面的人更好地理解您要解决的问题。谢谢!
标签: jquery highcharts