When I set ValueAxis to negative, the chart will missing some field(Second image), below are my js code, can anyone help on this?
(And I use Amcharts 3.4.5)
<script>
Amcharts.ready(function(){
var chartData=<%# Eval("MyAmchartData")%>;
//chart
var chart=new Amcharts.AmSerialChart();
chart.dataProvider=chartData;
chart.categoryField="country";
chart.pathToImages="../amcharts/images/";
chart.type="serial";
chart.theme="none";
chart.addTitle("Customed Chart Title", 15);
//graph
var graph=new Amcharts.AmGraph();
graph.title='-------This is my customed title-------';
graph.valueField='Name of the value field in my dataProvider';
graph.type='line';
graph.bullet='round';
graph.lineColor='#4572A7';
graph.labelText='[[tool]]';
graph.bulletField='bullet';
graph.colorField='bullet_fillColor';
chart.addGraph(graph);
//ValueAxis
var valueAxis=new Amcharts.ValueAxis();
valueAxis.position='left';
valueAxis.title='-------This is my customed title-------';
valueAxis.titleColor='#4572A7';
valueAxis.titleFontSize=14;
valueAxis.axisThickness=1;
valueAxis.includeGuidesInMinMax=true;
valueAxis.axisThickness=1;
valueAxis.axisThickness=1;
if(<%# Eval("YAxisMax")%> >100){
valueAxis.logarithmic=true;
valueAxis.useScientificNotation=true;
}
valueAxis.maximum=10000;
valueAxis.minumum=-1;
valueAxis.axisColor='#4572A7';
valueAxis.axisThickness=2;
valueAxis.gridAlpha=0;
valueAxis.axisAlpha=1;
chart.addValueAxis(valueAxis);
graph.valueAxis=valueAxis;
//categoryAxis
var categoryAxis=chart.categoryAxis;
categoryAxis.autoGridCount=false;
categoryAxis.gridCount=chartData.length;
categoryAxis.gridPosition="start";
categoryAxis.labelRotation=-90;
//Legend
var legend=new Amcharts.AmLegend();
legend.useGraphSettings=true;
legend.borderAlpha=1;
legend.horizontalGap=0;
legend.position="bottom";
legend.valueText='';
chart.addLegend(legend);
//Cursor
var cursor=new Amcharts.ChartCursor();
cursor.cursorPosition='mouse';
cursor.categoryBalloonAlpha=0.5;
cursor.graphBulletSize=1;
cursor.cursorAlpha=0;
cursor.valueBalloonEnabled=false;
chart.addChartCursor(cursor);
//Write
chart.write("chartdiv");
});
</script>
<div id="chartdiv" style="width:100%; height:580px;"></div>
Positive minumum to 1:
Positive minumum to 1
Negative minumum to -1:
Negative minumum to -1
I hope the chart can show ValueAxis minimum to -1 and second iamge can work as correct as first image.