Example 022: Graph Mixing Plotting Methods per Subset

PegoGraph Objectbeginner

Mixing Plotting Methods per Subset

Preview

ProEssentials Pego Graph Object - Graph Mixing Plotting Methods per Subset
Click to enlarge

Source Code

Form2.cs
1// This example builds upon the basic CreateSimpleGraph '000' example chart //
2CreateSimpleGraph(Pego1);
3
4// Set plotting method per subset //
5Pego1.PePlot.Methods[0] = GraphPlottingMethods.HighLowArea;
6Pego1.PePlot.Methods[1] = GraphPlottingMethods.HighLowArea;
7Pego1.PePlot.Methods[2] = GraphPlottingMethods.Line;
8Pego1.PePlot.Methods[3] = GraphPlottingMethods.Bar;
9
10// Set High/Low Labels //
11Pego1.PeString.SubsetLabels[0] = "High";
12Pego1.PeString.SubsetLabels[1] = "Low";
13
14// Set Other Various Properties //
15Pego1.PeColor.BitmapGradientMode = true;
16Pego1.PeColor.QuickStyle = QuickStyle.LightLine;
17
18// Make the line types bold //
19Pego1.PeLegend.SubsetLineTypes[0] = LineType.MediumSolid;
20Pego1.PeLegend.SubsetLineTypes[1] = LineType.MediumSolid;
21Pego1.PeLegend.SubsetLineTypes[2] = LineType.ThickDot;
22Pego1.PePlot.MarkDataPoints = true;
23
24Pego1.PePlot.Option.FixedLineThickness = true; // Direct2D Thick Dashes requires Fixed Thickness to support large resolution
25
26// Change the Bar's color //
27Pego1.PeColor.SubsetColors[3] = Color.FromArgb(32, 0, 0, 150);
28
29// Add a table //
30Pego1.PeTable.Show = GraphPlusTable.Both;
31Pego1.PeData.Precision = 0;
32
33Pego1.PeFunction.ReinitializeResetImage();
34Pego1.Invalidate();
35// Optionally call Pego1.Refresh() if you are not seeing changes immediately
Tip: Uses property syntax like Pego1.PeData.Y[s, p]Click underlined properties to view documentation