AmChart仅激活1个子弹

时间:2018-11-06 11:24:38

标签: javascript amcharts

我正在使用AmChart,我想激活项目符号,但前提是要放在光标所在的位置,这样我才能做到:

 var defaultStockChartData = {
   ...
   "ChartCursor": 
    {
        "cursorColor": "#000000",
        "color": "#000000",
        "cursorAlpha": 0.5,
        "bulletSize" : 8,
        "bulletsEnabled" : true
    },
...
enter code here

但是我得到这个结果:

enter image description here

我该如何做才能使光标停留在项目符号上?

1 个答案:

答案 0 :(得分:0)

如果可以帮助某人,我会找到一种方法。您需要将项目符号的不透明度设置为图表中的0和chartCursorSettings中的1:

 "chartCursorSettings": 
        {
            "enabled":true,
            "graphBulletAlpha":1,
            "bulletsEnabled" : true
        },
...
 "panels" : [ {

            "percentHeight" : 70,
            "showCategoryAxis" : true,

            "stockGraphs" : [ {
                "type" : "line",
                "id" : "g1",
                "bulletBorderAlpha": 1,
                "bulletColor": "#000000",
                "bullet": "round",
                "bulletAlpha" : 0,
                "bulletBorderAlpha" : 0,
            } ]