Contents
- Customizing Ticks:
- TickPosition:
Having trouble getting help?
Contact Support
Contact Support
Scale Tick Mark Settings in Windows Forms Bullet Graph
17 Feb 20252 minutes to read
Quantitative scale is displayed with two types of ticks:
Major ticks, the primary scale indicators.
Minor ticks, the secondary scale indicators that fall in between the major ticks.
Customizing Ticks:
The stroke of the major and minor ticks is customized by setting the MajorTickStroke and MinorTickStroke properties. The size is modified by using the MajorTickSize and MinorTickSize properties. By setting MajorTickStrokeThickness and MinorTickStrokeThickness, the stroke’s thickness is customized.
BulletGraph bullet = new BulletGraph();
bullet.Dock = DockStyle.Fill;
bullet.FeaturedMeasure = 4.5;
bullet.ComparativeMeasure = 7;
bullet.MajorTickStroke = Color.Black;
bullet.MajorTickSize = 15;
bullet.MinorTickSize = 10;
bullet.MajorTickStroke = Color.Red;
bullet.MinorTickStroke = Color.Green;
bullet.MinorTicksPerInterval = 3;
bullet.QualitativeRanges.Add(new QualitativeRange() { RangeEnd = 4, RangeCaption = "Bad", RangeStroke = Color.Red });
bullet.QualitativeRanges.Add(new QualitativeRange() { RangeEnd = 7, RangeCaption = "Satisfactory", RangeStroke = Color.Yellow });
bullet.QualitativeRanges.Add(new QualitativeRange() { RangeEnd = 10, RangeCaption = "Good", RangeStroke = Color.Green });
this.Controls.Add(bullet);
TickPosition:
The ticks in the scale are placed above or below the ranges of the quantitative scale by choosing the options available in the TickPosition property.
They are:
- Below (Default)
- Above
- Cross
BulletGraph bullet = new BulletGraph();
bullet.Dock = DockStyle.Fill;
bullet.ComparativeMeasure = 7;
bullet.TickPosition = BulletGraphTicksPosition.Cross;
bullet.MajorTickSize = 30;
bullet.MinorTickSize = 30;
bullet.MinorTicksPerInterval = 3;
bullet.QualitativeRanges.Add(new QualitativeRange() { RangeEnd = 4, RangeCaption = "Bad", RangeStroke = Color.Red });
bullet.QualitativeRanges.Add(new QualitativeRange() { RangeEnd = 7, RangeCaption = "Satisfactory", RangeStroke = Color.Yellow });
bullet.QualitativeRanges.Add(new QualitativeRange() { RangeEnd = 10, RangeCaption = "Good", RangeStroke = Color.Green });
this.Controls.Add(bullet);