问题是,列似乎位于一个后面,而不是一个在另一个上面
请看看http://jsfiddle.net/LLWft/2/
var chart1=new AmCharts.AmSerialChart();
chart1.theme="light";
chart1.colors=["#00a0db", "#428bca"];
var legend = new AmCharts.AmLegend();
legend.horizontalGap=10;
legend.maxColumns=1;
legend.position="right";
legend.useGraphSettings=true;
legend.markerSize=10;
chart1.addLegend(legend);
chart1.dataProvider=chartData;
chart1.valueAxes.stackType="regular";
chart1.valueAxes.axisAlpha=0.3;
chart1.valueAxes.gridAlpha=0.3;
chart1.graphs=chartGraphs;
chart1.categoryField="year";
chart1.categoryAxis.gridPosition="start";
chart1.categoryAxis.axisAlpha=0;
chart1.categoryAxis.gridAlpha=0;
chart1.categoryAxis.position = "left";
chart1.write('chartdiv');
最佳答案
终于我找出了问题
我已经通过数组设置了valueAxis,它解决了我的问题
请看看http://jsfiddle.net/LLWft/3/
chart1.valueAxes=[{
"stackType": "regular",
"axisAlpha": 0.3,
"gridAlpha": 0.3
}];
关于javascript - 显示堆积柱形图(amcharts库),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/27035747/