如何更改 amChart 中的气球位置

How to change ballon location in amChart

我实际上正在构建一个 amchart,但我找不到修改子弹上出现的气球位置的方法。

这是我的代码:

var chart = AmCharts.makeChart("chartdiv", {
      ...
      "balloon": {
        "textAlign" : "left",
        "color" : "#000000",
        "fixedPosition" : false,
        "offsetX" : 50,
        "offsetY" : 50,
        "animationDuration" : 0.3,
        "borderAlpha" : 0,
        "borderColor" : "#FFFFFF",
        "cornerRadius" : 0,
        "pointerWidth" : 0,
        "showBullet" : false,
        "horizontalPadding" : 5,
        "verticalPadding" : 5,
      }
    });

但这是我得到的: 为什么 offsetX 和 offsetY 对我的气球没有任何影响?

Per the documentation, offsetX and offsetY only work when fixedPosition is set to false and the chart cursor is disabled. Since you have the cursor enabled, it won't work. You'll need to use an external div if you want to change the position while using a cursor, similar to this demo. Note that the changed listener will go into the stock panel 股票图表。