Configuring ILAxis lines

All properties for lines drawn with ILPanel are specified by using the ILLineProperties class. The most important line properties are:

PropertyDescription
AntialiasingDraw the lines nice and smoothly. The minimal width of the line is set to 2.
ColorColor of the lines.
PatternUser defined line stipple pattern for line style 'UserPattern'.
PatternScaleScaling for line stipple patterns (default: 4.0f)
StylePredefined line stipple patterns (default: solid)
VisibleSwitch the lines on/off.
WidthThe width of the line. If Antialiasing is on, this value is ≥ 2.

Setting axis line properties

ILLineProperties are set individually for 'near' axis lines and 'far' axis lines. The following examples demonstrates how to set several properties for X and Y axis.

ILPanel panel = ILPanel.Create();
Controls.Add(panel); 
panel.SetBounds(10,10,500,400); 
// add some example data (2D)
ILArray a = ILSpecialData.sincos1D(41,2.0); 
ILPlot2DGraph[] plot2d = panel.Graphs.AddPlot2DGraph(a);
// configure X axis 
ILAxis axis = panel.Axes[0]; 
axis.FarLines.Visible = false; 
axis.NearLines.Color = Color.Red; 
axis.NearLines.Style = LineStyle.PointDash; 
// configure Y axis
axis = panel.Axes[AxisNames.YAxis]; 
axis.NearLines.Visible = false; 
axis.FarLines.Width = 3; 
axis.FarLines.Color = Color.FromArgb(0,255,12);

The output should look similar to this picture: example3

The complete example can be downloaded as VS2005 solution here.


Valid CSS! Valid XHTML 1.0 Transitional