From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

In the properties window from a CWGraph you can set the style (bar, line, multicolor). How can you do this programmaticly?

I can't find the style property in my object inspector(Delphi). With style, I want to set the graphic type. For example: simple, bar or multicolor. In the help from the CWGraph object I can not find anything about it. I have solved the problem now by exporting the desired graph and then import it if I create a new object Dynamicly. Does anyone have an answer?
0 Kudos
Message 1 of 2
(3,362 Views)
You set the style for each individual CWPlot, not the graph itself. Each plot can have its own style, the graph style sheet is just there for quick changes of common plot styles. You would change the LineStyle, PointStyle, Colors, etc of each plot to do this programmatically. For example, to pick a bar style for a plot you would:

CWGraph1.Plots(1).LineStyle = cwLineStepXY
CWGraph1.Plots(1).FillToBase = True
CWGraph1.Plots(1).PointStyle = cwPointNone

This would create a plot that steps and is filled to base with no points shown (bars). If you want to see how the graph styles change the plots, pick a graph style in the property pages, then look at the plot page and see how the plot properties changed.

Best Regards,

Chris Matthews
Measurement Studio Suppo
rt Manager
Message 2 of 2
(3,362 Views)