【问题标题】:HighCharts tooltip pointFormat not updating labelHighCharts 工具提示点格式不更新标签
【发布时间】:2019-10-31 19:21:34
【问题描述】:

我似乎无法使用 tooltip: { pointFormat: "custom label"} 选项更改工具提示值标签。

我正在将 Highcharts 集成到 chartkick gem 中,并且我已确保 chartkick 确实在使用 highcharts 适配器。其他库选项可用,例如 xAxisyAxis

这里是有问题的代码:

column_chart @registrations.joins(:clinic).group("clinics.name").count,
              title: "Registrations Per Clinic",
              library: {
                  tooltip: {
                      pointFormat: "Registrations: <b>{point.y}</b>"
                  },
                  xAxis: {
                      title: { text: "Clinic" }
                  },
                  yAxis: {
                      allowDecimals: false,
                      title: { text: "Number of Registrations" }
                  }
              }

无论工具提示使用“值”一词呈现什么

【问题讨论】:

标签: ruby-on-rails highcharts chartkick


【解决方案1】:

你可以试试 tooltip.formatter : Documentation

【讨论】:

猜你喜欢
  • 2014-03-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-03-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多