jquery - 使用 plotOptions highchart (BAR) 在栏下添加文本
问题描述
嗨,我尝试plotOptions datalabels
为每个栏添加额外的文本。我得到了我想要的值,但我不能把它放在栏下。
我的代码
plotOptions: {
series: {
dataLabels: {
useHTML: true,
formatter:function() {
var pcnt = (this.y / dataSum) * 100;
return '<span class="" style="color:' + this.point.color + '">' + Highcharts.numberFormat(pcnt) + '%' + '</span> <span class="">' + this.point.name + ' this i want put under the bar' + '</span>';
}}
}
}
我尽量不使用datalabels
fromxasix
因为我也想展示它。如何使额外的文本位于每个栏的下方?
如果有人除了使用plotoptions
im 之外还有其他建议。谢谢你。
这是链接
解决方案
推荐阅读
- python - 将 python int 存储为 Hbase 的 byte[] 数组
- firebase - 如何将数据从firestore发送到实时数据库
- unreal-engine4 - 有没有办法自动按住按钮?
- r - 将标签放在polygonswuth ggplot2之外?即在海中或地图的角落
- python - 是否有像在 javascript 中一样声明单个对象的“快捷方式”?
- python - 使用 tfds 分割数据集
- python - Scrapy - 为什么 Css Selector / Xpath 返回不同的输出?
- sql - 使用 Oracle SQL 开发人员为每次运行选择不同数据的 Oracle SQL
- json - 根据闭包上下文的要求,返回类型“Future ”不是“Widget”
- antd - 具有嵌套元素的表组件数据源