XY Chart NET 3 Control Reference
Scale Class - TickLabelSpacing Property

For X scales, TickLabelSpacing is the minimum tick label spacing based on the percentage of the maximum displayed tick label width.  The actual spacing may be greater than the minimum value depending on the major tick scale interval that is calculated.  The spacing is based on the number of characters in the major tick labels as well as the tick label font.  A value of 0 sets the spacing to be as close as possible without any of the X scale tick labels overlapping.  A value of 2 sets the spacing to be a minimum of twice the width of the widest X scale tick label.  Increasing the TickLabelSpacing value will minimize scale flicker as the auto-scale calculation determines the optimum difference between two major ticks.  Increasing TickLabelSpacing is typical for the X scale in a trending application.

For Y scales, TickLabelSpacing is the minimum vertical spacing between two major tick labels.  The actual spacing may be greater than the minimum value depending on the major tick scale interval that is calculated.   The spacing is a percentage of the tick label character height, which is based on the tick label font.  A value of 0 sets the spacing to be as close as possible without overlapping of the major tick labels.  A value of 2 sets the spacing to be a minimum of twice the height of the Y scale tick label font.  Typically in trending applications, increasing the TickLabelSpacing value minimizes scale adjustments as the auto-scale calculation determines the optimum major tick scale interval.

TickLabelSpacing is a property of the Scale Class.

Example 1
' XYChartNETCtl1 is the name of the XY Chart NET control instance placed on the form.

XYChartNETCtl1.NumProfiles = 2
XYChartNETCtl1.NumXScales = 1
XYChartNETCtl1.NumYScales = 1

XYChartNETCtl1.XAxis(0).Scale.TickLabelSpacing = 0
XYChartNETCtl1.YAxis(0).Scale.TickLabelSpacing = 0

XYChartNETCtl1.Refresh  'Refresh required to update chart with changes made
// XYChartNETCtl1 is the name of the XY Chart NET control instance placed on the form.

XYChartNETCtl1.NumProfiles = 2;
XYChartNETCtl1.NumXScales = 1;
XYChartNETCtl1.NumYScales = 1;

XYChartNETCtl1.get_XAxis(0).Scale.TickLabelSpacing = 0;
XYChartNETCtl1.get_YAxis(0).Scale.TickLabelSpacing = 0;

XYChartNETCtl1.Refresh();  //Refresh required to update chart with changes made
// XYChartNETCtl1 is the name of the XY Chart NET control instance placed on the form.

XYChartNETCtl1->NumProfiles = 2;
XYChartNETCtl1->NumXScales = 1;
XYChartNETCtl1->NumYScales = 1;

XYChartNETCtl1->get_XAxis(0).Scale->TickLabelSpacing = 0;
XYChartNETCtl1->get_YAxis(0).Scale->TickLabelSpacing = 0;

XYChartNETCtl1->Refresh();  //Refresh required to update chart with changes made

 

Example 2
' XYChartNETCtl1 is the name of the XY Chart NET control instance placed on the form.

XYChartNETCtl1.NumProfiles = 2
XYChartNETCtl1.NumXScales = 1
XYChartNETCtl1.NumYScales = 1

XYChartNETCtl1.XAxis(0).Scale.TickLabelSpacing = 2
XYChartNETCtl1.YAxis(0).Scale.TickLabelSpacing = 2

XYChartNETCtl1.Refresh  'Refresh required to update chart with changes made
// XYChartNETCtl1 is the name of the XY Chart NET control instance placed on the form.

XYChartNETCtl1.NumProfiles = 2;
XYChartNETCtl1.NumXScales = 1;
XYChartNETCtl1.NumYScales = 1;

XYChartNETCtl1.get_XAxis(0).Scale.TickLabelSpacing = 2;
XYChartNETCtl1.get_YAxis(0).Scale.TickLabelSpacing = 2;

XYChartNETCtl1.Refresh();  //Refresh required to update chart with changes made
// XYChartNETCtl1 is the name of the XY Chart NET control instance placed on the form.

XYChartNETCtl1->NumProfiles = 2;
XYChartNETCtl1->NumXScales = 1;
XYChartNETCtl1->NumYScales = 1;

XYChartNETCtl1->get_XAxis(0).Scale->TickLabelSpacing = 2;
XYChartNETCtl1->get_YAxis(0).Scale->TickLabelSpacing = 2;

XYChartNETCtl1->Refresh();  //Refresh required to update chart with changes made

 

 

See Also

 

 


© 2003 - 2013 ControlEng Corporation. All rights reserved.