My code:
chartArea = new XYChart(Width - 16, Height - 142);
chartArea.setPlotArea(50, 5, Width - 16 - 100, Height - 142 - 57, 0xffffff, -1, -1, 0xcccccc, 0xcccccc);
chartArea.xAxis().setTickDensity(Width - 16 - 100);
chartArea.setClipping();
chartArea.yAxis2().syncAxis(chartArea.yAxis());
chartArea.xAxis().setLabelFormat("");
chartArea.xAxis().setLabelStyle("Arial", 6);
viewer.ZoomInWidthLimit = 5.0 / ordinalList[0].Count;
chartArea.xAxis().setLabels(xAsixDate[0].ToArray());
try { viewer.setFullRange("x", ordinalList[0][0], ordinalList[0][ordinalList[0].Count - 1]); } catch { }
chartArea.xAxis().setLabelStep(ordinalList[0].Count / timeInterval / 200 * GridFactor);
viewer.syncLinearAxisWithViewPort("x", chartArea.xAxis());
layer[0] = chartArea.addLineLayer2();
layer[0].addDataSet(yAsixDate[0].ToArray(), colorInteget[0]);
layer[0].setXData(ordinalList[0].ToArray());
layer[0].setLineWidth(wLines[0]);
chartArea.yAxis().setAutoScale(0.01, 0.01, 0.01);
viewer.Chart = chartArea;
viewer.ImageMap = chartArea.getHTMLImageMap("clickable", "", "title='{xLabel|mm/dd/yyyy hh:mm:ss} n$ {value}'");
picture 1 - full graph
picture 2 - region of graph
if i use zooming y-axis dont auto scaling based min and max values in visible region on graph
|