Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Can we zoom and use value pairs for the axis?

Hi!

I am utilizing visual C++ 6.0 and Component works for my current project where we are displaying some electrical faults on the CWGraph class in log scale. The X Axis is in duration format, i.e. ms, sec, min, day etc. and I am utilizing value pairs to properly display the labels values in the X axis. I set the major and minor unit interval values to zero and added value pairs for the X axis values 1 ms, 10ms, 100 ms ...1 day, etc. ( I looked at the answers to the previously posted questions for this!!). Hence I can show the values in log scale for the x axis succesfully. However, after adding the value paires, the two axis zoom option, track mode = ZoomrectXY doesnot work and I cannot zoom when I display the graph. If t
he value pairs are removed and use normal scaling, the zooming comes back. Is there a workaround to this problem.

I would greatly appreciate your help!!

Asaf
0 Kudos
Message 1 of 4
(3,197 Views)
Hello

I added value pairs to the graph, changed the axes to log mode. I also changed the format for time. The only time I was not able to zoom-in was when my X axis was not set to autoscale, which makes sense. Otherwise, it seems to work. If you have an small example of the problem, you can attach it here, and I can give it a shot

Thanks

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 4
(3,197 Views)
Bilal,

Since I am using my custom x axis labels as value pairs, I need to check the auto-scaling false, otherwise the log values for the x axis and value pair labels mix and do not look good on the graph. Below are the settings I used for graph:

Axes->X Axis->Scale Style->Auto Scale: Unchecked
Axes->X Axis->Scale Style->Minimum : 0
Axes->X Axis->Scale Style->Maximum : 1e+009
Axes->X Axis->Scale Style->Log : Checked
Axes->X Axis->Scale Style->Inverted : Unchecked


Axes->Y Axis->Scale Style->Auto Scale: Checked
Axes->Y Axis->Scale Style->Log : Unchecked
Axes->Y Axis->Scale Style->Inverted : Checked

Ticks->X Axis->Tick Spacing->Major : 0
Ticks->X Axis->Tick Spacing->Minor : 0
Ticks->X Axis->Tick Spacing->Base : 0 ( All grayed out)

Ticks
->Y Axis->Tick Spacing : Automatic


The other settings are assigned default values.

Hence, as I mentioned before the X Axis values are assigned as 1 sec, 10 sec, 1min, 10 min, 1 h ..etc.
and all on log scale. I need to utilize value pairs for this I think. Since I do not want the auto scale values, I uncheck it. You mentioned by unchecking auto scale, one will not be able to zoom. If so, is there another approach to display the graph as I want and zoom at the same time?

Thanks,

Asaf
0 Kudos
Message 3 of 4
(3,197 Views)
The only other way I can think of is if you do the zooming operation manually by manipulating the axis min and max values programatically inside the various events associated with the graph. You could use cursors to allow the user to set the limits for zooming.

I hope this helps

Bilal
Bilal Durrani
NI
0 Kudos
Message 4 of 4
(3,197 Views)