LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

attr_ylabel_angle for a StripChart

I would like to rotate my X-axis labels (ATTR_XLABEL_ANGLE) on a stripchart. 

However when I enter a value for ATTR_XLABEL_ANGLE in the control settings dialog, my Y-axis labels also rotate.  No matter what I set ATTR_YLABEL_ANGLE to, they are rotated the same amount as the X labels.

I have tried modifying the values in code as well, and I see the same result.

 

I have label strings enabled for my X-axis, label strings disabled for my Y-axis. 

My Strip Chart control is in continuous mode with 8 traces.

 

I am currently using Labwindows 2013 SP2. 

 

I have 2015, but I can't get it to build anything in it... I keep getting a message of "Error writing project file 'c:\CVI\PROJ_NAME\PROJ.prj" (badly formed pathname)' when I try to build my 2013 projects in 2015.

0 Kudos
Message 1 of 11
(4,506 Views)

That attribute works well on my machina with CVI2012SP2 as you can see in this screenshot; pay attention that the value is in tenths of degrees: to have the shown aspect I used a value of 450.

 

Rotated Y-labels.png



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 11
(4,502 Views)

This was my mistake.  I had been loading a saved panel state within my code, and I must have made a change to the stripchart or the panel since the last time I saved the panel state.  After I deleted and recreated the saved state, I was unable to replicate the original problem.

0 Kudos
Message 3 of 11
(4,491 Views)

Oops, the problem just happened again, and I now have it isolated.  It wasn't just a saved panel state causing the problem.

 

I made a copy of the stripchart project you used and the problem occurs there too.

 

In the stripchart project, on the UIR, go to: Panel->EditPanel->Other Attributes-> and select 'sizeable' and 'scale contents on resize.'

 

Run the UI again (it should still look right with the Y-axis labels rotated 45-degrees like you showed), then resize the panel.  The Y-axis labels will adopt the rotation angle of the X-axis labels.

 

 

The reason my previously saved panel state was causing the issue is because the panel was resized in the saved state.

0 Kudos
Message 4 of 11
(4,489 Views)

Oh,  resizing is a different beast! This behavior looks like a bug to me.  As a workaround I can suggest to install a panel callback and trap EVENT_PANEL_SIZE event into which to apply the attribute again to the chart. 



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 5 of 11
(4,481 Views)

Yes, this is what I had done already.  I grab the label rotation angles at panel load, then trap the panel resize event, and repopulate the rotation angles at that time.

0 Kudos
Message 6 of 11
(4,433 Views)

I would not mark Roberto's answer as a solution (of course he deserves kudos for the workaround!), but I would be afraid that if NI does not file a corrective action request this bug will never be fixed

0 Kudos
Message 7 of 11
(4,430 Views)

I'm submitting this as a bug report as well as another related to strip charts. 

 

Do NI folks typically monitor these forums and initiate their own bug reports, or do I need to submit bug reports for each item? 

0 Kudos
Message 8 of 11
(4,428 Views)

@Mr.Matt wrote:
Do NI folks typically monitor these forums and initiate their own bug reports, or do I need to submit bug reports for each item? 

'In principle' they do Smiley Wink

0 Kudos
Message 9 of 11
(4,426 Views)

Hi All,

 

I will attempt to replicate the behavior on my end and post an update once I am able to do so.

 

Regards,

 

Kyle S.

Applications Engineer

National Instruments

http://www.ni.com/support

0 Kudos
Message 10 of 11
(4,384 Views)