NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
rene
Posts: 5
0 Kudos

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?
Active Participant
Chris Matthews
Posts: 1,168

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

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
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page