我有以下示例:使用以下js的小提琴:
var chart = AmCharts.makeChart("chartdiv", {
"type": "serial",
"legend": {
"useGraphSettings": true
},
"dataProvider": chartData,
"valueAxes": [{
"id": "v1",
"axisColor": "#FF6600",
"axisThickness": 5,
"gridAlpha": 0.1,
"axisAlpha": 1
}, {
"id": "v2",
"axisColor": "#FCD202",
"axisThickness": 5,
"gridAlpha": 0,
"axisAlpha": 1,
"position": "right",
"synchronizeWith": "v1",
"synchronizationMultiplier": 5
}],
"graphs": [{
"valueAxis": "v1",
"type": "column",
"fillColors": "#008800",
"title": "red line",
"valueField": "visits"
},
...我期望参数"fillColors":"#008800",将图表中的列更改为绿色填充,但我没有达到这个结果。他们只保留这个红色的轮廓。
有什么建议吗?
发布于 2018-05-26 12:47:34
你应该设置"fillAlphas"。例如,我将其设置为1. 工作小提琴
"graphs": [{
"valueAxis": "v1",
"type": "column",
"fillColors": "#008800",
"fillAlphas":1, /* here i set it */
"title": "red line",
"valueField": "visits"
}, {
"valueAxis": "v2",
"type": "smoothedLine",
"lineColor": "#c2c2c2",
"bulletBorderThickness": 1,
"hideBulletsCount": 30,
"title": "yellow line",
"valueField": "hits",
"fillAlphas": 0
}],https://stackoverflow.com/questions/50542819
复制相似问题