amcharts - 如何在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',
},
在此之后,我想在更新图表中添加另一个图形对象。怎么做。
解决方案
推荐阅读
- android - 如何解决索引越界?
- css - Flexbox 渲染被最新的 Chrome 破坏
- python - Jupyter Notebook 5.7.6(上次更新)显示空白页
- c++ - 如何实现一个奇怪的for循环
- javascript - 在 Javascript 中使用“this”作为函数应用
- javascript - 用于 JavaScript 中任何内容的 Setter
- r - 仅使用 geom_areas 更改 ggplot2 中的图例颜色
- python - 是否有一种更简洁的方法可以根据字符串中的特定子字符串获取多个变量的平均值
- openjpa - 无法从命令行运行 openjpa 工具
- reactjs - 反应映射每个孩子并为每个孩子添加css样式