彩票走势图

ProEssentials动画演示1:制作简单图表

原创|使用教程|编辑:龚雪|2014-01-15 09:25:22.000|阅读 612 次

概述:今天为大家带来工业控制图表制作工具ProEssentials的动画演示,文章中附带源码,大家可以直接复制代码,进行操作。

# 慧都年终大促·界面/图表报表/文档/IDE等千款热门软控件火热促销中 >>

工业控制图表制作工具ProEssentials大家都比较熟悉吧,在科学计算、工业控制、金融统计等行业中 都有出色的表现, ProEssentials 7已经早早发售了,ProEssentials 8,已经在路上。今天开始,我们要为大家带来ProEssentials的动画演示,制作的版本是ProEssentials 8测试版(内测版本,暂时还未发售),我们提前来体验一下ProEssentials 8,看看是不是惊喜依旧。在演示中,我们还会提供相应图表的代码,方便大家实践操作。

今天我们先热热身,来看看用ProEssentials制作简单图表。

代码:

//! Right button click to show popup menu. //
//! Double Click to show customization dialog. //
//! Left-Click and drag to draw zoom box. Use popup memu or 'z' to undo zoom. //

// Simple example show the basics of a graph object. //
// Graph's generally only contain YData because we assume
// data is plotted equally spaced left to right.

int s, p;

// Enable Bar Glass Effect //
Pego1.PePlot.Option.BarGlassEffect = true;

// Enable Plotting style gradient and bevel features //
Pego1.PePlot.Option.AreaGradientStyle = PlotGradientStyle.RadialBottomRight;
Pego1.PePlot.Option.AreaBevelStyle = BevelStyle.MediumSmooth;
Pego1.PePlot.Option.SplineGradientStyle = PlotGradientStyle.RadialBottomRight;
Pego1.PePlot.Option.SplineBevelStyle = SplineBevelStyle.MediumSmooth;

// v7.2 new features //
Pego1.PePlot.Option.PointGradientStyle = PlotGradientStyle.VerticalAscentInverse;
Pego1.PeColor.PointBorderColor = Color.FromArgb(100, 0, 0, 0);
Pego1.PePlot.Option.LineSymbolThickness = 3;
Pego1.PePlot.Option.AreaBorder = 1;
Pego1.PeUserInterface.Dialog.AllowSvgExport = true;

// Prepare images in memory //
Pego1.PeConfigure.PrepareImages = true;

// Pass Data //
Pego1.PeData.Subsets = 4;
Pego1.PeData.Points = 12;

for(s = 0; s <= 3; s++)
{
for(p = 0; p < 12; p++)
{
Pego1.PeData.Y[s, p] = ((p + 1) * 50) + ((float)(Rand_Num.NextDouble()) * 250) + 2 + 700.0F - ((s * 140.0F));
}
}

Pego1.PePlot.DataShadows = DataShadows.Shadows;
Pego1.PeUserInterface.Allow.FocalRect = false;
Pego1.PePlot.Method = GraphPlottingMethod.Area;
Pego1.PeGrid.LineControl = GridLineControl.Both;
Pego1.PeGrid.Style = GridStyle.Dot;
Pego1.PePlot.Allow.Ribbon = true;
Pego1.PeUserInterface.Allow.Zooming = AllowZooming.HorzAndVert;
Pego1.PeUserInterface.Allow.ZoomStyle = ZoomStyle.Ro2Not;

// Enable middle mouse dragging //
Pego1.PeUserInterface.Scrollbar.MouseDraggingX = true;
Pego1.PeUserInterface.Scrollbar.MouseDraggingY = true;

Pego1.PeString.MainTitle = "Units Sold per Month";
Pego1.PeString.SubTitle = "";
Pego1.PeString.YAxisLabel = "Units Sold";
Pego1.PeString.XAxisLabel = "Month";

// subset labels //
Pego1.PeString.SubsetLabels[0] = "Texas";
Pego1.PeString.SubsetLabels[1] = "Florida";
Pego1.PeString.SubsetLabels[2] = "Washington";
Pego1.PeString.SubsetLabels[3] = "California";

// point labels //
Pego1.PeString.PointLabels[0] = "January";
Pego1.PeString.PointLabels[1] = "February";
Pego1.PeString.PointLabels[2] = "March";
Pego1.PeString.PointLabels[3] = "April";
Pego1.PeString.PointLabels[4] = "May";
Pego1.PeString.PointLabels[5] = "June";
Pego1.PeString.PointLabels[6] = "July";
Pego1.PeString.PointLabels[7] = "August";
Pego1.PeString.PointLabels[8] = "September";
Pego1.PeString.PointLabels[9] = "October";
Pego1.PeString.PointLabels[10] = "November";
Pego1.PeString.PointLabels[11] = "December";

// subset colors //
Pego1.PeColor.SubsetColors[0] = Color.FromArgb(128, 198, 0, 0);
Pego1.PeColor.SubsetColors[1] = Color.FromArgb(128, 0, 198, 198);
Pego1.PeColor.SubsetColors[2] = Color.FromArgb(128, 198, 198, 0);
Pego1.PeColor.SubsetColors[3] = Color.FromArgb(128, 0, 198, 0);

// subset line types //
Pego1.PeLegend.SubsetLineTypes[0] = LineType.MediumSolid;
Pego1.PeLegend.SubsetLineTypes[1] = LineType.MediumSolid;
Pego1.PeLegend.SubsetLineTypes[2] = LineType.MediumSolid;
Pego1.PeLegend.SubsetLineTypes[3] = LineType.MediumSolid;
Pego1.PeLegend.SubsetLineTypes[4] = LineType.MediumSolid;
Pego1.PeLegend.SubsetLineTypes[5] = LineType.MediumSolid;
Pego1.PeLegend.SubsetLineTypes[6] = LineType.MediumSolid;
Pego1.PeLegend.SubsetLineTypes[7] = LineType.MediumSolid;

// subset point types //
Pego1.PeLegend.SubsetPointTypes[0] = PointType.DotSolid;
Pego1.PeLegend.SubsetPointTypes[1] = PointType.UpTriangleSolid;
Pego1.PeLegend.SubsetPointTypes[2] = PointType.SquareSolid;
Pego1.PeLegend.SubsetPointTypes[3] = PointType.DownTriangleSolid;
Pego1.PeLegend.SubsetPointTypes[4] = PointType.Dot;
Pego1.PeLegend.SubsetPointTypes[5] = PointType.UpTriangle;
Pego1.PeLegend.SubsetPointTypes[6] = PointType.Square;
Pego1.PeLegend.SubsetPointTypes[7] = PointType.DownTriangle;

Pego1.PeLegend.SimplePoint = true;
Pego1.PeLegend.SimpleLine = true;
Pego1.PeLegend.Style = LegendStyle.OneLine;

// Allow stacked type graphs //
Pego1.PePlot.Allow.StackedData = true;

// Various other features //
Pego1.PeFont.Fixed = true;
Pego1.PeColor.BitmapGradientMode = true;
Pego1.PeColor.QuickStyle = QuickStyle.MediumLine;

Pego1.PePlot.Option.GradientBars = 8;
Pego1.PePlot.Option.LineShadows = true;
Pego1.PeFont.MainTitle.Bold = true;
Pego1.PeFont.SubTitle.Bold = true;
Pego1.PeFont.Label.Bold = true;
Pego1.PeConfigure.TextShadows = TextShadows.BoldText;
Pego1.PeFont.FontSize = FontSize.Large;

Pego1.PeData.Precision = DataPrecision.OneDecimal;
Pego1.PeTable.Show = GraphPlusTable.Both;
Pego1.PePlot.MarkDataPoints = false;

Pego1.PeConfigure.ImageAdjustLeft = 20;
Pego1.PeConfigure.ImageAdjustRight = 20;
Pego1.PeConfigure.ImageAdjustTop = 10;

// Set various export defaults //
Pego1.PeSpecial.DpiX = 600;
Pego1.PeSpecial.DpiY = 600;

// default export setting //
Pego1.PeUserInterface.Dialog.ExportSizeDef = ExportSizeDef.NoSizeOrPixel;
Pego1.PeUserInterface.Dialog.ExportTypeDef = ExportTypeDef.Png;
Pego1.PeUserInterface.Dialog.ExportDestDef = ExportDestDef.Clipboard;
Pego1.PeUserInterface.Dialog.ExportUnitXDef = "1280";
Pego1.PeUserInterface.Dialog.ExportUnitYDef = "768";
Pego1.PeUserInterface.Dialog.ExportImageDpi = 300;
Pego1.PeUserInterface.Dialog.AllowSvgExport = true;

Pego1.PeConfigure.RenderEngine = RenderEngine.Direct2D;
Pego1.PeConfigure.AntiAliasGraphics = true;
Pego1.PeConfigure.AntiAliasText = true;

// Generally call ReinitializeResetImage at end **'
Pego1.PeFunction.ReinitializeResetImage();

// Optionally call Pego1.Refresh() if you are not seeing changes immediately

图表效果:

ProEssentials制作简单图表动画

下载ProEssentials:点击这里


标签:工控图表

本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至chenjj@pclwef.cn

文章转载自:慧都控件网

为你推荐

  • 推荐视频
  • 推荐活动
  • 推荐产品
  • 推荐文章
  • 慧都慧问
扫码咨询


添加微信 立即咨询

电话咨询

客服热线
023-68661681

TOP