Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

waveformGraph Clone

Hi,
 
I have developed an application with a colourful waveformGraph, and I'm able to print this with no problem.
 
However, I also want to provide an option to print the waveformGraph as simple monochrome graph, to save printer ink costs.
 
I think I need to create a clone of the displayed waveformGraph, and then tweak the colouring of the graph and then call the ToImage method. Unfortunately, I can't find a Clone method for the waveformGraph.
 
Should I be thinking about wrting a clone method? Or is there a simpler way of going about this?
 
Many thanks,
 
Michael
0 Kudos
Message 1 of 4
(3,192 Views)
You can try this way:
- [before printing] set colors for your Graph to the "gray" scheme;
- print the graph;
- [after printing] restore colors back to the "rainbow" scheme.

For each graph object (Graph, Plot, Axis, Cursor) you will have to change 3-6 properties.

0 Kudos
Message 2 of 4
(3,169 Views)
YuGen,
 
Thanks for the reply, as there is no Clone method, I'll do as you suggest!
 
With appreciation,
 
Michael
0 Kudos
Message 3 of 4
(3,162 Views)
Hello Michael,

1. The Clone method exists for Plots and Axes. So you can clone your plot staying with the same graph object.

2. After cloning you will have to change the colors for your new object.
Maybe I missed something, but I don't understand advantages of cloning.

WBR,
YG

0 Kudos
Message 4 of 4
(3,146 Views)