如何在双轴上创建 onclick 事件 - 具有负值和融合线图的分组堆积列

问题描述

我已经集成了融合图表双轴 - 带有负值的分组堆叠列和下面的代码

现在,如果用户单击双轴 - 分组堆叠列(双轴中的 Onclick() 事件 - 分组堆叠列),我想运行一些功能。如果用户单击“分组堆叠列”,则内容显示在弹出窗口中例如:作为弹出页面

谁能帮我实现这个目标。

Javascript 代码

chart: {
  caption: "Growth Accounting",pyaxisname: "Monthly Active Users [MAU]",syaxisname: "Growth Ratio",numbersuffix: "M",numdivlines: "7",adjustdiv: "0",syaxismaxvalue: "5",syaxisminvalue: "-3",yaxisminvalue: "-30",yaxismaxvalue: "30",theme: "fusion",drawcustomlegendicon: "1",plottooltext: "$label,$seriesname: $dataValue",palettecolors: "#A5A5A5,#5EB863,#DD8341"
},categories: [
  {
    category: [
      {
        label: "January"
      },{
        label: "February"
      },{
        label: "march"
      },{
        label: "April"
      },{
        label: "May"
      },{
        label: "June"
      }
    ]
  }
],dataset: [
  {
    dataset: [
      {
        seriesname: "churned",data: [
          {
            value: "-8"
          },{
            value: "-7"
          },{
            value: "-5"
          },{
            value: "-21"
          },{
            value: "-23"
          },{
            value: "-15"
          }
        ]
      },{
        seriesname: "New",data: [
          {
            value: "8"
          },{
            value: "8"
          },{
            value: "22"
          },{
            value: "24"
          },{
            value: "14"
          },{
            value: "4"
          }
        ]
      },{
        seriesname: "Retained",data: [
          {
            value: "1"
          },{
            value: "1"
          },{
            value: "2"
          },{
            value: "1"
          }
        ]
      }
    ]
  }
],lineset: [
  {
    seriesname: "Growth Ratio",showvalues: "0",color: "#FDCB50",anchorbgcolor: "#FDCB50",showanchors: "0",data: [
      {
        value: "1"
      },{
        value: "1"
      },{
        value: "3.2"
      },{
        value: "1.2"
      },{
        value: "0.5"
      },{
        value: "0.2"
      }
    ]
  }
]
};

FusionCharts.ready(function() {
var myChart = new FusionCharts({
  type: "msstackedcolumn2dlinedy",renderAt: "chart-container",width: "100%",height: "100%",dataFormat: "json",dataSource
}).render();
}); ```

 





**HTML code**

  `<div id="chart-container"></div>`







**image link**

 https://www.fusioncharts.com/charts/combination-charts-dual-y/dual-axis-grouped-stacked-columns-chart-with-negative?framework=javascript






  

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)