Hi. I just updated the LabVIEW version to LabVIEW 2022 and found an issue regarding the line style in the NXG style graph. When I use an XY graph from NXG style to plot some data I'm not able to change the line style. Even when I change it to dashed line in the properties window it doesn't change in FP. If I do the same in other styles like the classic style the graph changes the line style. Attached is a simple random data generator to show the issue. Has anyone already got the same issue?
Solved! Go to Solution.
I can confirm that "NXG Style" Waveform Graphs in LabVIEW 2022 do not seem to support changing Line styles. Just for fun, I opened LabVIEW 2021 to see if it also had NXG Style controls -- it does, and the Waveform Graphs don't support changing the Line style either. Don't have LabVIEW 2020 installed, and don't know where this "missing feature" got lost, but LabVIEW 2019 seems to support Line Style changes!
I'm (for now) satisfied with the Modern and Silver Palettes. If NI is looking to "fix" the problem in the Graph control implementation, it appears to have crept in between LabVIEW 2019 (where it appears to be present). I only checked that you could change it in the "Plot Legend" box in the upper right (see Picture), but can't be (easily, if at all) changed in LabVIEW 2021 and 2022.
Curiously, only Plot 0 appears to be affected. In Plot 1, I could change the Line Style, Width, and Color. (Of course, I didn't try changing Style and Color with LabVIEW 2021 -- when I did, I found that they could be changed, too. Oops. So the problem might be only in Line Style ...)
Hi Bob. Thank you for your help. I just found something. In LabVIEW 2022, in the classic style graph, the anti-aliased property (which we can access with a right-click on the plot legend) is turned off by default. In LV 2022 this property is turned on by default in the NXG style graph. So when we turn off this property, the dashed and dotted lines work again.
It definitely is a bug (they released a feature that, at some point, they set a switch that caused something weird to happen with Plot 0, but possibly not with the other plots). At a minimum (like when the next "quarterly release", which we no longer call them Service Packs) comes out, the Anti-Alias property should be turned back on.
I think (now that you've found the underlying problem) I can see where this is coming from. One of the features of LabVIEW NXG, I believe, was to take advantage of the 25+ years of PC (and Graphics) development from when LabVIEW was first released. "In the Old Days, my son, we drew lines by making a row of dots on a 320x240 grid, and developed some pretty snazzy algorithms to do it, too". Now, of course, there are vector processors that are optimized in silico (Latin, ha, for "in silicon") to turn on pixels in 1920 x 1080 arrays, "interpolating" by altering the intensity from you giving it much less data (I haven't looked at how modern graphics hardware works, but it wouldn't surprise me if you only had to give them end-points to draw a straight connecting line of almost any width, so four coordinates and a width and zip, there's your line).
I believe that one of the Big Deals about NXG was to be its use of Vector Graphics. When they added the NXG-style controls, at some point they left some "Vector Graphic" controls in place, perhaps, and you happened to find it. Do us a favor and file a Service Request, under "Report a Bug" (though, I hope, an NI Developer will see this post and do it for you). You can refer them to this Discussion in the Forum, and tell them that "Bob Schor sent me!".