rails chartkick gchart删除悬停值(工具提示)

时间:2018-03-07 22:05:47

标签: ruby-on-rails google-visualization tooltip chartkick gchart

我正在使用chartick并希望在悬停时从工具提示中删除单词值(下图)。所以我将得到Thu 33,406而不是Thu值:33,406
enter image description here 是否有可能因为我没有直接使用谷歌图表?

1 个答案:

答案 0 :(得分:0)

我最终使用的是highcharts。

<%= pie_chart $top_10_mention.reverse, adapter: "highcharts", id:"mention",  colors: "#4B83B4", download: "mention", refresh: 60,
library: { 
    style: {color: "blue", fontSize: 10},
    tooltip: {pointFormat: "<b>{point.y}</b>"},
    chartArea: {left: "2", top: "5", width: "70%", right: "30"},
    legend: { position: "right", maxLines: 10, textStyle: {color: "blue", fontSize: 10}},
    colors: ["#C2F4FF", "#82B6FF", "#ec8f6e", "#0099FF", "#F76161", "#76BDD1", "#E53434", "#005F9D", "#FFC2C2", "#5D90EC"]
  }
%>    

工具提示:{pointFormat:“ {point.y} ”},