Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/375.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Google柱形图隐藏值为零的数据的批注_Javascript_Angularjs_Charts_Google Visualization - Fatal编程技术网

Javascript Google柱形图隐藏值为零的数据的批注

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,

下面是我的数据和我正在发送给angular google wrapper的系列:


您需要相应地调整数据

根据
系列
定义

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
]