分享

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

 表里表外 2014-01-16

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

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

ProEssentials制作简单图表

点击查看大图

ProEssentials制作简单图表

点击查看大图

代码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
//! 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:点击这里


    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约