LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Minimum and maximum values Stripchart

Solved!
Go to solution
Hi,
don't know how to set maximum and minimum values in StripChart?

I do not know what attribute is set, I did not find it in the properties and I want to set these values through numeric.

Thank you for your advice.
value.jpg
0 Kudos
Message 1 of 7
(4,235 Views)

The function to set the axis values is SetAxisScalingMode, passing VAL_MANUAL in Axis Scaling parameter and desired values in min and max.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 7
(4,165 Views)
Hi Roberto,

yes, I've already used that.

But I have a problem that on the right side of the graph the values will change, but on the left, you don't know what it can be?
 
EVENT_VAL_CHANGED:
			GetCtrlVal (panelGraf, PANELGRAF_AUTOSCALE, &val);
			if (val)
			{
				SetAxisScalingMode (panel, VYSKA_GRAFVYS, VAL_LEFT_YAXIS ,VAL_AUTOSCALE, 0, 0);
				SetAxisScalingMode (panel, VYSKA_GRAFVYS, VAL_RIGHT_YAXIS,VAL_AUTOSCALE, 0, 0);
			}
			else
			{
				SetAxisScalingMode(panel, VYSKA_GRAFVYS, VAL_LEFT_YAXIS , VAL_MANUAL, 480.0, 620.0);
				SetAxisScalingMode(panel, VYSKA_GRAFVYS, VAL_RIGHT_YAXIS, VAL_MANUAL, 480.0, 620.0);
			}
			break;
Untitled 1.jpg
I don't know why it's not possible on the right side.
 
0 Kudos
Message 3 of 7
(4,143 Views)

There is no reason for the graph not updating axis range in manual mode.

The only possible reason for the axis not being updated is when you set it in autoscale and actually don't have any trace associated to that axis.

Does SetAxisScalingmode returns any error?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 7
(4,125 Views)
If I set the values in manual mode, the range can be changed for both axes.
It's alright.

But if I have autoscale, then the graph works the value of the left side of the axis changes automatically, but the right one does not change.

Although my problem solved, I wanted to adjust the Y-axis range manually.

But I also wanted it to be an automatic range option.

There are no SetAxisScalingmode problems.

Thank you
0 Kudos
Message 5 of 7
(4,116 Views)
Solution
Accepted by topic author MajklS

As I told before, if there is no plot associated to the right axis of the stripchart the autoscale won't work since it has no data to autoscale against.

Check that you have at least one trace bound to the right Y-axis of the stripchart. If you have none, then you might consider hiding the axis at all.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 6 of 7
(4,114 Views)
Yes you're right.

I did not realize that there must be a supply value on both sides of the axes.

I simply leave the autoscale on the left side and hide the right side of the axis.

Again thank you for the solution.

Have a nice day Smiley Happy
0 Kudos
Message 7 of 7
(4,110 Views)