High Low Area
1//! New high-low area plotting method. This plotting type is created by2//! setting PlottingMethod to PEGPM_SPECIFICPLOTMODE, and then3//! SpecificPlotMode set to PESPM_HIGHLOWAREA. This is similar to how4//! open-high-low-close and box-plot charts are created.5//! You can also use this plotting type per subset as shown in example 022.6 7float f1;8float f2;9float f3;10int p;11 12// v9 features new default CursorPromptLocation = ToolTip13Pesgo1.PeUserInterface.Cursor.PromptTracking = true;14Pesgo1.PeUserInterface.Cursor.PromptLocation = CursorPromptLocation.ToolTip;15Pesgo1.PeUserInterface.Cursor.PromptStyle = CursorPromptStyle.XYValues;16 17// Enable middle mouse dragging //18Pesgo1.PeUserInterface.Scrollbar.MouseDraggingX = true;19Pesgo1.PeUserInterface.Scrollbar.MouseDraggingY = true;20 21// Enable Bar Glass Effect //22Pesgo1.PePlot.Option.BarGlassEffect = true;23 24// Enable Plotting style gradient and bevel features //25Pesgo1.PePlot.Option.AreaGradientStyle = PlotGradientStyle.RadialBottomRight;26Pesgo1.PePlot.Option.AreaBevelStyle = BevelStyle.MediumSmooth;27Pesgo1.PePlot.Option.SplineGradientStyle = PlotGradientStyle.RadialBottomRight;28Pesgo1.PePlot.Option.SplineBevelStyle = SplineBevelStyle.MediumSmooth;29 30// Enable ZoomWindow //31Pesgo1.PePlot.ZoomWindow.Show = true;32 33Pesgo1.PeData.Subsets = 3;34Pesgo1.PeData.Points = 600;35 36// Pass XData and YData //37for (p = 0; p < 600; p++)38{39 Pesgo1.PeData.X[0, p] = (p + 1.0F);40 Pesgo1.PeData.X[1, p] = (p + 1.0F);41 Pesgo1.PeData.X[2, p] = (p + 1.0F);42 43 f1 = (float)(150.0F + (Math.Sin(p * 0.03F) * 100.0F) + (Rand_Num.NextDouble() * 2));44 Pesgo1.PeData.Y[0, p] = f1;45 f2 = (float)(25.0F + (Math.Sin(p * 0.07F) * 50.0F) + (Rand_Num.NextDouble() * 2));46 Pesgo1.PeData.Y[1, p] = f2;47 f3 = (float)(((f1 + f2) / 2.0F) + (Rand_Num.NextDouble() * 20) + 25.0F);48 Pesgo1.PeData.Y[2, p] = f3;49}50 51// Set Plotting Style and Comparison Subsets //52Pesgo1.PePlot.Method = SGraphPlottingMethod.SpecificPlotMode;53Pesgo1.PePlot.SpecificPlotMode = SpecificPlotMode.HighLowArea;54Pesgo1.PePlot.ComparisonSubsets = 1;55 56// Subset colors //57Pesgo1.PeColor.SubsetColors[0] = Color.FromArgb(225, 255, 225, 20);58Pesgo1.PeColor.SubsetColors[1] = Color.FromArgb(125, 0, 40, 190);59Pesgo1.PeColor.SubsetColors[2] = Color.FromArgb(150, 255, 0, 40);60 61// Set Line Styles //62Pesgo1.PePlot.SubsetLineTypes[0] = LineType.MediumSolid;63Pesgo1.PePlot.SubsetLineTypes[1] = LineType.MediumSolid;64Pesgo1.PePlot.SubsetLineTypes[2] = LineType.MediumSolid;65 66// Allow zooming and panning //67Pesgo1.PeUserInterface.Allow.Zooming = AllowZooming.Horizontal;68Pesgo1.PeUserInterface.Scrollbar.ScrollingHorzZoom = true;69Pesgo1.PeUserInterface.Scrollbar.ScrollingScaleControl = true;70 71// Set Various Other Properties //72Pesgo1.PeColor.BitmapGradientMode = true;73Pesgo1.PeColor.QuickStyle = QuickStyle.MediumLine;74Pesgo1.PeUserInterface.Allow.FocalRect = false;75Pesgo1.PeUserInterface.Allow.ZoomStyle = ZoomStyle.Ro2Not;76Pesgo1.PeFont.Fixed = true;77Pesgo1.PeConfigure.PrepareImages = true;78Pesgo1.PeConfigure.CacheBmp = true;79Pesgo1.PeConfigure.TextShadows = TextShadows.BoldText;82Pesgo1.PeFont.Label.Bold = true;83Pesgo1.PePlot.Option.LineShadows = true;85Pesgo1.PeFont.SizeGlobalCntl = 1.2F;86Pesgo1.PeGrid.Configure.AutoMinMaxPaddingX = 0;87Pesgo1.PeGrid.Configure.ManualScaleControlX = ManualScaleControl.Min;88Pesgo1.PeGrid.Configure.ManualMinX = 0.0;89Pesgo1.PePlot.Allow.Bar = false;90 91Pesgo1.PeString.MainTitle = "High Low Area";92Pesgo1.PeString.SubTitle = "Inverted data uses secondary color, intersecting point is interpolated.";93 94// Set various export defaults //95Pesgo1.PeSpecial.DpiX = 600;96Pesgo1.PeSpecial.DpiY = 600;97 98// default export setting //99Pesgo1.PeUserInterface.Dialog.ExportSizeDef = ExportSizeDef.NoSizeOrPixel;100Pesgo1.PeUserInterface.Dialog.ExportTypeDef = ExportTypeDef.Png;101Pesgo1.PeUserInterface.Dialog.ExportDestDef = ExportDestDef.Clipboard;102Pesgo1.PeUserInterface.Dialog.ExportUnitXDef = "1280";103Pesgo1.PeUserInterface.Dialog.ExportUnitYDef = "768";104Pesgo1.PeUserInterface.Dialog.ExportImageDpi = 300;105 106Pesgo1.PeConfigure.RenderEngine = RenderEngine.Direct2D;107Pesgo1.PeConfigure.AntiAliasGraphics = true;108Pesgo1.PeConfigure.AntiAliasText = true;109 110// Generally call ReinitializeResetImage at end **'111Pesgo1.PeFunction.ReinitializeResetImage();112Pesgo1.Invalidate();113// Optionally call Pesgo1.Refresh() if you are not seeing changes immediatelyPego1.PeData.Y[s, p]Click underlined properties to view documentation