简体   繁体   English

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

[英]rails chartkick gchart remove value on hover (tooltip)

I am using chartick and wanted to remove the word value(image below) from the tooltip on hover. 我正在使用chartick,并希望从悬停时的工具提示中删除单词value(下图)。 So I will have Thu 33,406 instead of Thu value: 33,406 所以我将得到33,406而不是Thu值:33,406
在此处输入图片说明 Is it possible since I am not using google chart directly? 因为我没有直接使用Google图表,所以有可能吗?

I end up using 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"]
  }
%>    

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM