ProEssentials创建蜡烛图的代码

ProEssentials创建这些类型的图形实际上需要多个子集来定义绘制图形的不同方面。当构建一个这些类型的图表时,首先确保设置一个合适Subsets属性值。

将PlottingMethod设置为SpecificPlotMode,然后对SpecificPlotMode进行适当的设置。

例如,如果需要生成High-Low Bar(需要2子集)连同1条比较线用来显示每个条形图的中间点。

Pego1.Subsets = 3
Pego1.Points = 4
 
Pego1.YData(0, 0) = 100: Pego1.YData(0, 1) = 150
Pego1.YData(0, 2) = 200: Pego1.YData(0, 3) = 250
Pego1.YData(1, 0) = 200: Pego1.YData(1, 1) = 250
Pego1.YData(1, 2) = 300: Pego1.YData(1, 3) = 350
Pego1.YData(2, 0) = 150: Pego1.YData(2, 1) = 200
Pego1.YData(2, 2) = 250: Pego1.YData(2, 3) = 300
 
Pego1.PlottingMethod = 15 ' 15 = Specific Plot Mode (for Graph)
Pego1.SpecificPlotMode = 1 ' 1 = High-Low Bar
 
Pego1.ComparisonSubsets = 1 ' One comparison subset
Pego1.PlottingMethodII = 8 ' Comparison Subset as Points + Line
 
Pego1.SubsetsToLegend(0) = -1 ' Get rid of subset legend area

上面代码会生成结果如下图:

ProEssentials创建蜡烛图的代码


你可能感兴趣的:(ProEssentials,工业图表,工控图表,蜡烛图,图表制作)