Home > Sample Charts > DialChart > Multiple Pointers and Zones

Multiple Pointers and Zones

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.

The final chart has two values, which would typically by shown (as here) with pointers of different lengths. There is no limit to the number of pointers or Zones, but in practice this chart is probably at the limit of what the dial can reasonably display. It would be much better to make a matrix of dials using a trellis to show several related values.


SharpPlot sp = new SharpPlot;
sp.SetMargins(24,24,12,12);

sp.Heading = "Multiple Pointers and Zones";
sp.SetBackground(Color.Silver);
sp.SetChartBackground(Color.White,FillStyle.Solid);
sp.SetAxisStyle(Color.Black,LineStyle.Solid,2);
sp.SetXLabelFont("Arial",12,FontStyle.Bold);

sp.SetColors(new Color[]{Color.Navy,Color.Maroon});
sp.DialChartStyle = DialChartStyles.ArrowLines;
sp.SetPenWidths(new double[] {2,1.2});
sp.SetLineStyles(LineStyle.Solid);

sp.SetXRange(100);
sp.SetXTickMarks(20,3);

xzones = new Zone[]{new Zone(0,10,Color.Lime),new Zone(40,70,Color.Orange),
         new Zone(70,100,Color.Red)};
sp.SetXZones(xzones);

radii = new int[] {100,50};
data = new int[] {25,56};

sp.DrawDialChart(data,radii);

Worked Examples

dialchart1 dialchart2 dialchart3 dialchart4

Send comments on this topic
© Dyalog Ltd 2013