0
var chart = AmCharts.makeChart("chartdiv", {
"type": "serial",
"dataProvider": chartData,
"categoryField": "date",
"categoryAxis": {
"parseDates": false,
"gridAlpha": 0.15,
"minorGridEnabled": true,
"axisColor": "#DADADA",
"title": 'Timp'
},
"valueAxes": [{
"axisAlpha": 0.2,
"id": "v1",
}],
"graphs": [{
"title": "Starea echipamentului",
"id": "g1",
"valueAxis": "v1",
"valueField": "starea",
"autoGridCount": true,
"bullet": "round",
"bulletBorderColor": "#FFFFFF",
"bulletBorderAlpha": 1,
"lineThickness": 2,
"lineColor": "#b5030d",
"negativeLineColor": "#0352b5",
"balloonText": "[[category]]<br><b><span style='font-size:14px;'>value: [[value]]</span></b>",
}],
"titles": [
{
"size": 15,
"text": window.location.href.split('?')[1].split('=')[1].replace('%20',' ')
}
],
"legend": {
"useGraphSettings": true
},
"chartCursor": {
"fullWidth": true,
"cursorAlpha": 0.1
},
"chartScrollbar": {
"scrollbarHeight": 40,
"color": "#FFFFFF",
"autoGridCount": true,
"graph": "g1"
},
"mouseWheelZoomEnabled": true,
"responsive": {
"enabled": true
},
"export": {
"enabled": true,
"libs": {
"path": "http://amcharts.com/lib/3/plugins/export/libs/"
}
}
});
所以我在y轴上的图形只有0,0.5和1的值。如果我有我在y轴上有0.5的图的一部分,它会在0.5(0.4 min和0.6 max)之间取值。我怎么想我的图形y轴显示0和1,而不是1.2。有任何想法吗?数值轴如何在AmChart的y轴上将最大值设置为1并将最小值设置为0?