|
From: Dave C. <dav...@gm...> - 2009-03-03 20:53:42
|
Here's some of the axis line up code I use:
plotSurface1.YAxis1.LabelOffsetAbsolute = true;
plotSurface1.YAxis1.AutoScaleTicks = true;
plotSurface1.YAxis1.Label = " ";
plotSurface1.YAxis1.LabelOffset = 50;
if ((double)chartDataTable.Rows[0][4] > 25) // xxx vs jpy
plotSurface1.YAxis1.NumberFormat = "{0:F2}";
else
plotSurface1.YAxis1.NumberFormat = "{0:F4}";
plotSurface1.YAxis2 = (Axis)plotSurface1.YAxis1.Clone();
plotSurface1.YAxis2.TickTextNextToAxis = false;
plotSurface1.YAxis2.Label = " ";
plotSurface1.YAxis2.LabelOffset = 50;
plotSurface1.XAxis1 = new LinearAxis(plotSurface1.XAxis1);
plotSurface1.XAxis1.IncreaseRange(1d /
chartDataTable.Rows.Count);
plotSurface1.XAxis1.SmallTickSize = 1;
plotSurface1.XAxis1.LabelOffset = 40;
// Indicator Chart
indicatorPlot.Clear();
indicatorPlot.DateTimeToolTip = true;
indicatorPlot.BackColor = Color.Cornsilk;
indicatorPlot.PlotBackColor = Color.Ivory;
indicatorPlot.Add(GetZeroLinePlot(), 1000);
indicatorPlot.SmoothingMode =
System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
indicatorPlot.Add(new Grid());
indicatorPlot.Padding = 5;
indicatorPlot.YAxis1.LabelOffsetAbsolute = true;
indicatorPlot.YAxis1.AutoScaleTicks = true;
indicatorPlot.YAxis1.Label = "CCI";
indicatorPlot.YAxis1.LabelOffset =
plotSurface1.YAxis1.LabelOffset;
indicatorPlot.YAxis2 = (Axis)indicatorPlot.YAxis1.Clone();
indicatorPlot.YAxis2.TickTextNextToAxis = false;
indicatorPlot.YAxis2.Label = " ";
indicatorPlot.YAxis2.LabelOffset =
plotSurface1.YAxis2.LabelOffset;
indicatorPlot.XAxis1 = new LinearAxis(indicatorPlot.XAxis1);
indicatorPlot.XAxis1.IncreaseRange(1d /
chartDataTable.Rows.Count);
indicatorPlot.XAxis1.SmallTickSize = 1;
indicatorPlot.XAxis1.LabelOffset = 40;
|