02-26-2014 11:11 AM
When displaying multiple curves on one 2d graph in reports how do I force one curve to be in the foreground? I have two signals and I want to show one overlayed on top of the other. Right now Diadem will only graph it the other way around. I have tried deleting the curves and re-adding them in differnt orders, changin the order they are in the curve list, changing their order inthe data portal, right clicking on the curve and selecting "move to forground" (this only moves the entire 2-d graph object to the foreground). Im using Diadem 12.0 Basic.
Solved! Go to Solution.
02-26-2014 02:13 PM
Hello jdferdon,
Here is what I get when I re-arrange the graphs in the Curve and Axis definition in DIAdem 2012:
Report
The only thing I changed in the dialog was the order of the graphs:
And this is what I get:
Are you seeing a different behavior? If so, please share your REPORT layout so we can investigate ...
Otmar
02-27-2014 09:09 AM
Here are some example files. (the same ones I am using with some of the additional data/graphs stripped out) It is the top 2d graph that is giving me problems.
-Joe
02-27-2014 02:04 PM
Hello Joe,
I'll need the TDX file with the data that belongs to the TDM header file as well please. TDM files are saved in two actual files, the TDM has the header information, the TDX has the binary data).
Thanks,
Otmar
02-27-2014 03:27 PM
Here they are as a zip. (FYI your forum system does not recognize .tdx as a valid file extension)
02-28-2014 02:03 PM - edited 02-28-2014 02:08 PM
Hello Joe,
I figured out what causes your curves to draw in the wrong "order".
You are using two Y-axes, and DIAdem always draws the data for Y1 before Y2, no matter what the order of the curves is in the "Curve and Axis Definition" dialog.
I am attaching your layout with a small modification, I changed the Y1 and Y2 axis order (I swapped which Y-axis the data is displayed on), and I get the following result:
Once I looked at your layout it became clear why the order of the curves didn't reflect the order in which the curves were drawn. I didn't know this - so I just learned something new here as well.
I hope this answers your question, feel free to ask if there is anything else I can help you with.
Otmar
01-12-2017 07:27 AM
Is it possible to change this drawing behaviour? E.g. draw axis Y2 before axis Y1?
I do ask because i have the same "problem" but i don't want to change multiple reports with multiple axes and curves by hand... 😉 since this would also mean that i have to swap, rescale and rename those axes...
01-12-2017 08:34 AM
I had the idea to use the method Copy for ReportObjects to change the index and their drawing order, but it's only available from 2015. Any other code conclusions?
01-18-2017 08:19 AM
Hi olhass,
If you're using the Report object, and if the curves in question are all assigned to the same Y axis, then you can change the order programmatically with the following commands:
Set Graph = Report.ActiveSheet.Objects("2D-Axis1") Call Graph.Curves2D.Move(3, 1) Call Report.Refresh()
Note that axis Y1 will always be drawn before axis Y2, etc., so if your curves are spread across multiple Y axes, that is a hard restriction.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
01-19-2017 06:31 AM
Thanks Brad,
but drawing axis Y2 before Y1 was exactly what i wanted to solve... so it's not possible to change the index of the sub object "2D-Axis1"? e.g.
Set rAxes = r2DAxisArea.YAxisList rAxes.Add("SecondAxis") rAxes.Add("ThirdAxis")
Set oMyObjects = Report.ActiveSheet.Objects
oMyCopyAxis = oMyObjects.Copy("FirstAxis","FirstAxisToFourth",1)
rAxes.Item("FirstAxis").Name = "FourthAxis"
rAxes.Item("FirstAxisToFourth").Name = "FirstAxis"
Wouldn't this change the reference (curves objects reference to the name of the axis object) of all curves to "index" 4 of the axis list, and so plot these curves on top? I can't test this.