highcharts - 如何使用 Highcharts 将文本放置在水平条形图数据点中以及在每个数据点下方添加文本?下面的例子:
问题描述
解决方案
您可以使用该annotations
模块:
annotations: [{
labels: [{
borderRadius: 0,
padding: 20,
backgroundColor: '#fff',
style: {
color: '#000'
},
point: {
xAxis: 0,
yAxis: 0,
x: 0,
y: 15
},
y: -130,
text: 'Col de la Joux'
}]
}]
现场演示:http: //jsfiddle.net/BlackLabel/eb9k5o7m/
API 参考: https ://api.highcharts.com/highcharts/annotations
文档: https ://www.highcharts.com/docs/advanced-chart-features/annotations-module
推荐阅读
- android - 使用带有 android 导航组件的默认后退按钮行为
- java - CodeForces 问题中的歧义 - HashSet 与 LinkedHashSet 的使用
- c++ - Qt - 如果在 html 中指定字体,QTextDocument 会中断自动换行
- javascript - 我指的是自定义排版的 Angular 材料,得到 SassError: Undefined variable 的错误
- python - 从数据框中列的字符串值中获取 int 值
- python - TA-Lib 抽象 API 的好处
- c# - 序列化对象时如何忽略 JsonPropertyNameAttribute 注释?
- ios - 协议委托未给出预期结果
- javascript - div 在水平滚动时根据 offsetLeft 获取类
- javascript - setinterval 内的函数需要超过超时时间