如何避免 Google 折线图注释中的重叠

How to avoid overlapping in Google Line chart annotations

以下 Google 折线图输出中的注释相互重叠。我怎样才能将它们分开?

如果我可以像第一行(屏幕截图中的蓝色)那样重新定位注释,那就太好了,我可以将注释放在它下面,对于最上面的行,将注释放在上面。

我不确定如果不实现任何我不知道的逻辑,上述是否可行!但至少,如果我可以将注释分开并清楚地了解哪个注释是做什么用的,那现在就很好了。

在图表选项中,您可以调整每个系列的注释杆的长度。

要将注释移到该行下方,您可以使用负的词干长度。

将注释选项添加到系列选项...

var options = {
  series: {
    0: {  // <-- series 0
      annotations: {
        stem: {
          length: -10
        }
      }      
    },
    1: {  // <-- series 1
      annotations: {
        stem: {
          length: 10
        }
      }      
    },
    2: {  // <-- series 2
      annotations: {
        stem: {
          length: 20
        }
      }      
    }
  }
};