Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

CNiGraph Dimensions

Hello Gurus!!!

I would like to know if there is a way of returning the exact number of pixels in the black space(grid space) of an object of type CNiGraph. It is important to understand that I don't want the size of the entire control, only the space where the trace would is displayed,


thanks,


Philippe
0 Kudos
Message 1 of 5
(3,770 Views)
Unfortunately there is not a way to do this with CNiGraph. Just out of curiosity, what are you trying to do where you need this?

- Elton
0 Kudos
Message 2 of 5
(3,770 Views)
Well I am currently designing an interface for an acquistion system. Thus I would like to display a waveform in real time. However, I acquire up to 400 000 points which can obviously not all be displayed on screen. I thus have to resample my signal and in order to display a maximum number of point without overlaying points, I need to know how many point the graph can display. What I did so far and it could be acceptabl is to return the size of my window with : GetClientRect(&myrect), then take the percentage of that space occupied by the grid part of the CNiGraph control.

Voila,
any thoughts?

Thanks,

Philippe
0 Kudos
Message 3 of 5
(3,770 Views)
I am interested in getting and setting of the plot area. It would be useful when displaying several CNiGraph objects on a form with different scales. The possible different length of the axis labels in different graphs will prevent the plot areas to "line up" along the left edge.
Isn't it possible to set the size of the plot area in LabView?

Regards,

Per
0 Kudos
Message 4 of 5
(3,770 Views)
That is an interesting scenario. One drawback to resizing the plot area to any arbitrary size is that it's easy to configure the graph such that the axes get clipped and don't layout nicely anymore. What do you think about an alternate approach such as using a format string to specify that axis labels should be a certain number of digits wide, or a MinimumWidth property for the Y axis that specifies that the Y axis must be at least a certain width regardless of the width of the axis labels?

- Elton
0 Kudos
Message 5 of 5
(3,770 Views)