DIAdem Idea Exchange

About DIAdem Idea Exchange

Do you have a feature idea for how to improve NI DIAdem? Submit and vote on ideas now!

  1. Browse by label or search in the DIAdem Idea Exchange to see if your idea has previously been submitted. If your idea exists sure to vote for the idea by giving it kudos to indicate your approval!
  2. If your idea has not been submitted click Post New Idea to submit a product idea. Be sure to submit a separate post for each idea. Note: the DIAdem Idea Exchange is not the appropriate forum to submit technical support questions.
  3. Watch as the community gives your idea kudos and adds their input.
  4. As NI R&D considers the idea, they will change the idea status.
  5. Give kudos to other ideas that you would like to see implemented!

The DIAdem R&D team is committed to reviewing every idea submitted via the DIAdem Idea Exchange. However, we cannot guarantee the implementation of any DIAdem Idea Exchange submission until further documented.

Top Kudoed Authors
cancel
Showing results for 
Search instead for 
Did you mean: 

Optional REPORT Y-Axis auto-scaling for manual X-Axis range

Make an option to have REPORT auto-scaling work like VIEW:

VIEW updates the Y-Axis range to be appropriate for the presently visible data when Y-Axis auto-scaling is on and a manual X-Axis range is selected.

REPORT presently maintains the Y-Axis scale of the entire Y-Axis channel's range regardless of X-Axis range selection.

 

DIAdem Axis Scaling Behavior.jpg

 

The current behavior requires the user to manually scale both the X and Y axis, when manually selecting an X-Axis range on a highly variable data set.  In my case, I'm setting the X-Axis range in a script (last 30 days), but will now also have to determine and set a manual Y-Axis range for the 30 day window of X-Axis values.

 

I put "Optional" in the description because sometimes the current behavior is desired (if the user wishes to maintain a consistent Y-Axis at all times).

 

-Josh

 

4 Comments
Member

Having report autoscale like view does would save a massive amount of time when reviewing data over a specific time period.

 

-Missy

Member

 -JoshRew - How did you manage to set the x axis range in a script? Do you have something you can share? I have daily set points that I look at and for the first few days its fine. After about 50 days, it gets pretty hard to look at data since the x range keeps getting bigger. I would like it to just plot only the last 20 days of data. 

Member

Shevonv, the report TDR is loaded as part of a script that also updates the graphs.  Here's most of the relevant code, which uses the X-Channel TimeStampAbsolute to determine 30 days from the most recent test and set the X-Axis where necessary:

Dim XMaxDate

Dim NumDays

Dim oCurrObj, o2DAxisXScaling

Dim i, j

NumDays = 30

if cno("TimeStampAbsolute") > 0 then

   XMaxDate = cmax("TimeStampAbsolute") 'Get the most recent test's date

   XMaxDate = cdate(str(XMaxDate,"#mm/dd/yyyy")) + 1 'Chop off the time and add a day to offset from the end of the graph

   For i = 1 to Report.Sheets.Count 'Loop through all sheets

     For j = 1 to Report.Sheets(i).Objects.Count 'Loop through all sheet objects

       Set oCurrObj = Report.Sheets(i).Objects(j)

       Select Case oCurrObj.ObjectType

       Case eReportObject2DAxisSystem 'Update X-Axis scaling on all 2D Axis objects, regardless of name (no other objects)

         '------------------- 2DAxisXScaling ------------------------------

         Set o2DAxisXScaling = oCurrObj.XAxis.Scaling

          o2DAxisXScaling.AutoScalingType = eAxisAutoScalingManual

          o2DAxisXScaling.Type = e2DXScalingDateTime

          o2DAxisXScaling.Begin = Val(XMaxDate - NumDays)

           o2DAxisXScaling.Origin = o2DAxisXScaling.Begin

           o2DAxisXScaling.End = Val(XMaxDate)

        End Select

      Next 'j

    Next 'i

end if

Member

Thanks JoshRew for sharing. I'd certainly be able to modify my code to incorporate this as well when I launch my script.