我是Highcharts的全新设计师,需要设计一个与下图完全相同的水平条形图。Highcharts带条形文字的水平条形图
我试着摆弄周围和管理,以显示该酒吧内的4和2。但是,我无法在第一个栏的上方显示“已完成”文本,而在第二个栏的下方显示“正在操作”文本。我也想消除酒吧之间的差距。以下是我的代码到目前为止。
var chart = new Highcharts.Chart({
chart: {
renderTo:'container',
//marginLeft:120,
type:'bar'
},
legend: { enabled: false},
colors:['#173c64'],
xAxis: {
categories: ['4','2'],
labels: {
align:'left',
x:5,
style: {
fontSize: '4em',
color:'#fff'
}
},
lineWidth: 0,
gridLineWidth: 0,
lineColor: 'transparent',
minorTickLength: 0,
tickLength: 0,
title: {
enabled: false
}
},
yAxis: {
lineWidth: 0,
gridLineWidth: 0,
lineColor: 'transparent',
labels: {
enabled: false
},
minorTickLength: 0,
tickLength: 0,
title: {
enabled: false
}
},
title: {
margin:0,
useHTML: true,
text: "This Month",
style: {"color": "#333333", "fontSize": "1.5rem","fontWeight": "bold"}
},
series:[{
data:[{y: 20, color:'#0091dc'},{y: 17, color:'#173c64'}]
}]
});
如你所知,StackOverflow的是不是一个免费的代码编写的服务。请更新您的问题,以便在展示问题的[最小,完整和可验证示例](http://stackoverflow.com/help/mcve)中显示所有相关尝试。 –
添加了我到目前为止的代码 – user1066568