2
根據圖像我只獲得第一和第三列的標籤我如何在所有列中獲得標籤?下面我附上了一張圖片。無法使用amcharts添加所有標籤
JavaScript代碼:
<script type="text/javascript">
var chart;
var chartData = [ {
"month": "JAN",
"scores": 200,
"color": "#CD0D74"
}, {
"month": "FEB",
"scores": 700,
"color": "#FF6600"
}, {
"month": "MAR",
"scores": 800,
"color": "#FCD202"
}, {
"month": "APR",
"scores": 990,
"color": "#04D215"
} ];
var chart = AmCharts.makeChart("chartdiv1", {
"theme": "light",
type: "serial",
dataProvider: chartData,
categoryField: "month",
"startDuration": 1,
categoryAxis: {
labelRotation: 90,
gridPosition: "start"
},
graphs: [ {
valueField: "scores",
colorField: "color",
type: "column",
lineAlpha: 0.1,
fillAlphas: 1
} ],
chartCursor: {
cursorAlpha: 0,
zoomable: false,
categoryBalloonEnabled: false
},
export: {
enabled: true
}
});
</script>
這裏是HTML代碼:
<div id="chartdiv1"></div>
圖形圖像
請幫我解決這個問題。提前致謝。
非常感謝。真的,我犯了愚蠢的錯誤! – Akshay