Javascript Google柱形图隐藏值为零的数据的批注
下面是我的数据和我正在发送给angular google wrapper的系列:Javascript Google柱形图隐藏值为零的数据的批注,javascript,angularjs,charts,google-visualization,Javascript,Angularjs,Charts,Google Visualization,下面是我的数据和我正在发送给angular google wrapper的系列: 您需要相应地调整数据 根据系列定义 Series: [ "Event", "Registered", {"role":"annotation"}, "Participated", {"role":"annotation"}, "Offered", {"role":"annotation"} ] 典型的一排可能是这样的 Row: [ "Test", // Event 40,
您需要相应地调整数据 根据
系列
定义
Series: [
"Event",
"Registered",
{"role":"annotation"},
"Participated",
{"role":"annotation"},
"Offered",
{"role":"annotation"}
]
典型的一排可能是这样的
Row: [
"Test", // Event
40, // Registered
"40", // Registered annotation
30, // Participated
"30", // Participated annotation
0, // Offered
null // Offered annotation
]
当列值为零时,使用
null
进行注释您建议的上述数据必须是数据:[[“总计”,48,48,30,30,0],“A”,null,null,null,null,null,null],“B”,null,null,null,null,null,null,null]],但我不能这样做。我建议[“A”,0,null,0,null,0,null]
是的,你说得对,但列表中包含100多个阵列,它们都是动态的。阵列是如何构建的?如果无法合并,可以使用替换注释列的自定义计算。。。
Row: [
"Test", // Event
40, // Registered
"40", // Registered annotation
30, // Participated
"30", // Participated annotation
0, // Offered
null // Offered annotation
]