amcharts 问题用同步轴填充柱形图的条形图
amcharts issue to fill bar of column chart with synchronized axis
我有以下 jsfiddle 示例:
jsfiddle
使用以下 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",将图表的列更改为绿色并填充绿色,但我没有达到这个结果。他们只留下这个红色轮廓。
有什么建议吗?
你应该设置"fillAlphas"
。例如我将它设置为 1。 working jsfiddle
"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
}],
我有以下 jsfiddle 示例: jsfiddle 使用以下 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",将图表的列更改为绿色并填充绿色,但我没有达到这个结果。他们只留下这个红色轮廓。
有什么建议吗?
你应该设置"fillAlphas"
。例如我将它设置为 1。 working jsfiddle
"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
}],