05-31-2016 03:38 PM
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.
05-31-2016 05:46 PM
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.
06-01-2016 10:57 AM
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.
06-01-2016 11:32 AM
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.
06-01-2016 03:59 PM - edited 06-01-2016 04:00 PM
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.
06-03-2016 10:59 AM
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.
06-03-2016 11:12 AM
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
06-03-2016 11:30 AM
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?
06-03-2016 11:38 AM
@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
06-06-2016 09:38 AM
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