Example 010: Graph showing Stacked Bar

PegoGraph Objectbeginner

Stacked Bar

Preview

ProEssentials Pego Graph Object - Graph showing Stacked Bar
Click to enlarge

Source Code

Form2.cs
1//! Try this... Right Click chart and change the Plotting Method to Horizontal Bar Stacked. //
2
3// This example builds upon the basic CreateSimpleGraph '000' example chart //
4CreateSimpleGraph(Pego1);
5
6// Enable Stacked type charts //
7Pego1.PePlot.Allow.StackedData = true;
8Pego1.PePlot.Allow.HorzBarStacked = true;
9
10// Set plotting method //
11Pego1.PePlot.Method = GraphPlottingMethod.BarStacked;
12
13// Add a table //
14Pego1.PeTable.Show = GraphPlusTable.Both;
15Pego1.PeData.Precision = DataPrecision.TwoDecimals;
16
17// Generally call ReinitializeResetImage at end **'
18Pego1.PeFunction.ReinitializeResetImage();
19Pego1.Invalidate();
20// 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