显示Google柱形图的价值 [英] Show value of Google column chart
问题描述
我有一个使用Google可视化的专栏图。
现在,为了让我看到每个值,我必须悬停在每个图表上才能看到值。例如, 2.82 kbps
我想在每张图的顶部或内部显示我的所有值图形。
我该如何显示这样的内容?
任何提示都将非常感谢!
您应该查看注释。
柱形图文档有一个封面 here。
您可以将注释列添加到 DataTable
,第1列的注释应该位于索引之后,或者您可以创建视图并在源列中创建 stringify
。
pre $
view.setColumns([0,//descr列
1,//下行列
{
calc:stringify,
sourceColumn:1,//创建一个带有源列1的注释列
类型:string,
角色:注释
}]);
该注释是放置在列顶部的列图的标准。
I have a column chart using Google Visualization.
Right now, in order for me to see each value, I have to hover on each graph to see the value. Example, 2.82 kbps
I want to show all my value somewhere either on the top of each graph or inside the graph.
How can I show something like that ?
Any hints on that will be much appreciated !
You should look into annotations.
The column chart documentation has a cover of it here.
Either you add annotation columns to your DataTable
, annotation for column 1 should be at the index right after, or you can create a view and stringify
the source column.
view.setColumns([0, //The "descr column"
1, //Downlink column
{
calc: "stringify",
sourceColumn: 1, // Create an annotation column with source column "1"
type: "string",
role: "annotation"
}]);
The annotation is as standard for column charts placed at the top inside of the column.
这篇关于显示Google柱形图的价值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!