| Samples > DialChart |
A Simple Dial to Show One Value
The Dial or Gauge chart is often used to present a single value (maybe a benchmark index of company performance) in the context of an expected or desired range. The value on its own may mean very little (maybe our production plant made 23% rejects last week) until it is set in the context of the expected range.
This chart has a simple pointer, and adds a datum line to show a reasonable maximum value. Note that the x-range is used to range the dial here, and is always required as SharpPlot has no way to guess the correct range from a single data poi
SharpPlot sp = new SharpPlot();
sp.Heading = "Simple Pointer and Scale";
sp.SetAxisStyle(Color.Navy,LineStyle.Solid,1.2);
sp.SetXLabelFont("Arial",12,FontStyle.Bold);
sp.SetChartBackground(Color.Silver,FillStyle.Solid);
sp.SetPenWidths(2);
sp.SetXRange(30);
sp.SetXTickMarks(new int[] {5,4});
sp.SetDatumLineStyle(Color.Red,LineStyle.Dash,0.8);
sp.SetXDatumLines(25);
sp.DrawDialChart(17);
See also
![]() |
![]() |
![]() |
![]() |




