首页 > 解决方案 > 如何在amcharts的更新图表中添加amgraph

问题描述

我想在 stepline amchart 中显示多个折线图。但问题在于一个响应,我只需要显示一个折线图,对于另一个响应的同一个图表,我需要显示 2 个折线图。

     this.timeChart = this.AmCharts.makeChart("chartdiv2", {
  "type": "serial",
  "theme": "light",
  "marginRight": 80,
  "autoMarginOffset": 20,
  "marginTop": 7,
  "dataProvider": chartData,
"valueAxes": [{
    "axisAlpha": 0,
    "position": "left",
    "title": "Response Count",
    "autoGridCount": false,
    "gridCount": 5,
    "gridAlpha": 0
}],
"graphs": [{
    "id": "g1",
    "balloonText": "[[title]]<br>[[category]]<br><b>[[value]] </b>",
    "lineThickness": 1,
    "bullet": "square",
    "type": "step",
    "bulletAlpha": 0,
    "bulletSize": 4,
    "bulletBorderAlpha": 0,
    "valueField": "members",
    'lineColor': 'pink',
    'title': 'Member Response',
},

在此之后,我想在更新图表中添加另一个图形对象。怎么做。

标签: amcharts

解决方案


推荐阅读