Procedure

TfrmGraphs.SizeDates

Module

fGraphs

Last Modified

7/15/2014 3:26:36 PM

Visibility

Private

Owner

TfrmGraphs

Declaration

procedure SizeDates(aChart: TChart; aSmallTime, aBigTime: TDateTime);

Calls Hierarchy


TfrmGraphs.SizeDates
 ├TfrmGraphs.GraphFooter
 └TfrmGraphs.SeriesForLabels

Called-By Hierarchy


                                           TfrmGraphs.SizeDates
                                       TfrmGraphs.ChartOnZoom┤ 
                                       TfrmGraphs.MakeChart┤ │ 
                             TfrmGraphs.MakeSeparateItems┤ │ │ 
                                TfrmGraphs.MakeSeparate┘ │ │ │ 
                               TfrmGraphs.DisplayData┤   │ │ │ 
                             TfrmFrame.ClearPatient┤ │   │ │ │ 
                           TfrmFrame.SetupPatient┘ │ │   │ │ │ 
                      UpdatePatientInfoForAlert┤   │ │   │ │ │ 
                   TfrmFrame.mnuFileNextClick┘ │   │ │   │ │ │ 
                 TfrmFrame.mnuFileOpenClick┤   │   │ │   │ │ │ 
                     TfrmFrame.UMInitiate┤ │   │   │ │   │ │ │ 
            TfrmFrame.mnuFileNextClick...┤ │   │   │ │   │ │ │ 
            TfrmFrame.mnuFileRefreshClick┤ │   │   │ │   │ │ │ 
            TfrmOrders.CheckOrderStatus┤ │ │   │   │ │   │ │ │ 
        TfrmOrders.mnuActChgEvntClick┤ │ │ │   │   │ │   │ │ │ 
           TfrmOrders.mnuActHoldClick┤ │ │ │   │   │ │   │ │ │ 
         TfrmOrders.mnuActUnholdClick┤ │ │ │   │   │ │   │ │ │ 
          TfrmOrders.mnuActRenewClick┤ │ │ │   │   │ │   │ │ │ 
         TfrmOrders.mnuActChangeClick┤ │ │ │   │   │ │   │ │ │ 
           TfrmOrders.mnuActCopyClick┘ │ │ │   │   │ │   │ │ │ 
                 TfrmMeds.mnuActDCClick┤ │ │   │   │ │   │ │ │ 
                TfrmMeds.CheckMedStatus┘ │ │   │   │ │   │ │ │ 
             TfrmMeds.mnuActHoldClick┤   │ │   │   │ │   │ │ │ 
            TfrmMeds.mnuActRenewClick┤   │ │   │   │ │   │ │ │ 
           TfrmMeds.mnuActUnholdClick┤   │ │   │   │ │   │ │ │ 
           TfrmMeds.mnuActChangeClick┤   │ │   │   │ │   │ │ │ 
             TfrmMeds.mnuActCopyClick┤   │ │   │   │ │   │ │ │ 
           TfrmMeds.mnuActRefillClick┘   │ │   │   │ │   │ │ │ 
                       TfrmFrame.ViewInfo┘ │   │   │ │   │ │ │ 
                    TfrmDCSumm.ViewInfo┤   │   │   │ │   │ │ │ 
                  TfrmConsults.ViewInfo┤   │   │   │ │   │ │ │ 
          TfrmFrame.pnlRemindersMouseUp┤   │   │   │ │   │ │ │ 
           TfrmFrame.RemindersChanged┘ │   │   │   │ │   │ │ │ 
               TfrmFrame.FormCreate┘   │   │   │   │ │   │ │ │ 
                 TfrmFrame.pnlCIRNClick┤   │   │   │ │   │ │ │ 
           TfrmFrame.pnlVistaWebClick┤ │   │   │   │ │   │ │ │ 
                TfrmFrame.FormKeyDown┘ │   │   │   │ │   │ │ │ 
              TfrmFrame.pnlPatientClick┤   │   │   │ │   │ │ │ 
                TfrmFrame.pnlVisitClick┤   │   │   │ │   │ │ │ 
          TfrmFrame.pnlPrimaryCareClick┤   │   │   │ │   │ │ │ 
            TfrmFrame.pnlRemindersClick┤   │   │   │ │   │ │ │ 
             TfrmFrame.pnlPostingsClick┤   │   │   │ │   │ │ │ 
                 TfrmFrame.pnlFlagClick┤   │   │   │ │   │ │ │ 
                   TfrmFrame.laMHVClick┤   │   │   │ │   │ │ │ 
                  TfrmFrame.laVAA2Click┤   │   │   │ │   │ │ │ 
                    TfrmOrders.ViewInfo┤   │   │   │ │   │ │ │ 
                      TfrmMeds.ViewInfo┤   │   │   │ │   │ │ │ 
                   TfrmSurgery.ViewInfo┤   │   │   │ │   │ │ │ 
                     TfrmNotes.ViewInfo┤   │   │   │ │   │ │ │ 
                  TfrmProblems.ViewInfo┘   │   │   │ │   │ │ │ 
          TfrmFrame.mnuFileNotifRemoveClick┤   │   │ │   │ │ │ 
                  TfrmFrame.NextButtonClick┘   │   │ │   │ │ │ 
                TfrmFrame.SetUpNextButton┘     │   │ │   │ │ │ 
          TfrmFrame.mnuFileOpenClick...┤       │   │ │   │ │ │ 
                   TfrmFrame.FormResize┘       │   │ │   │ │ │ 
                 TfrmFrame.ChangeFont┘         │   │ │   │ │ │ 
         TfrmFrame.LoadSizesForUser┤           │   │ │   │ │ │ 
    TfrmFrame.LoadUserPreferences┘ │           │   │ │   │ │ │ 
           TfrmFrame.UMInitiate┘   │           │   │ │   │ │ │ 
         TfrmFrame.mnuFontSizeClick┘           │   │ │   │ │ │ 
                  TfrmFrame.mnuFileOpenClick...┤   │ │   │ │ │ 
               TfrmFrame.AllowCCOWContextChange┤   │ │   │ │ │ 
                TfrmFrame.mnuFileNextClick...┤ │   │ │   │ │ │ 
                TfrmFrame.mnuFileOpenClick...┤ │   │ │   │ │ │ 
       TfrmFrame.mnuFileResumeContextSetClick┘ │   │ │   │ │ │ 
                    TfrmFrame.UpdateCCOWContext┤   │ │   │ │ │ 
                TfrmFrame.mnuFileOpenClick...┤ │   │ │   │ │ │ 
              TfrmFrame.ctxContextorCommitted┤ │   │ │   │ │ │ 
               TfrmFrame.StartCCOWContextor┘ │ │   │ │   │ │ │ 
                     TfrmFrame.FormCreate┘   │ │   │ │   │ │ │ 
       TfrmFrame.mnuFileResumeContextGetClick┘ │   │ │   │ │ │ 
         TfrmFrame.mnuFileResumeContextSetClick┘   │ │   │ │ │ 
                            TfrmReports.ClearPtData┤ │   │ │ │ 
                        TfrmFrame.ClearPatient...┘ │ │   │ │ │ 
                                  TfrmReports.Graph┤ │   │ │ │ 
                       TfrmReports.tvReportsClick┘ │ │   │ │ │ 
                TfrmFrame.lstCIRNLocationsClick┤   │ │   │ │ │ 
                          TfrmFrame.SetUpCIRN┘ │   │ │   │ │ │ 
                  TfrmFrame.SetupPatient...┘   │   │ │   │ │ │ 
                        TfrmReports.DisplayPage┤   │ │   │ │ │ 
                       TfrmReports.LoadTreeView┤   │ │   │ │ │ 
                      TfrmReports.DisplayPage┤ │   │ │   │ │ │ 
         TfrmOptionsReportsDefault.btnOKClick┤ │   │ │   │ │ │ 
      TfrmOptionsReportsDefault.btnResetClick┤ │   │ │   │ │ │ 
       TfrmOptionsReportsCustom.btnApplyClick┘ │   │ │   │ │ │ 
        TfrmOptionsReportsCustom.btnOKClick┘   │   │ │   │ │ │ 
               TfrmReports.ProcessNotifications┤   │ │   │ │ │ 
                      TfrmReports.DisplayPage┘ │   │ │   │ │ │ 
                   TfrmReports.tvReportsKeyDown┤   │ │   │ │ │ 
                TfrmReports.tvProceduresKeyDown┤   │ │   │ │ │ 
                    TfrmReports.chkMaxFreqClick┤   │ │   │ │ │ 
           TfrmOptionsReportsDefault.btnOKClick┤   │ │   │ │ │ 
        TfrmOptionsReportsDefault.btnResetClick┤   │ │   │ │ │ 
      TfrmOptionsReportsCustom.btnApplyClick...┘   │ │   │ │ │ 
                        TfrmGraphs.chkItemsTopClick┤ │   │ │ │ 
                     TfrmGraphs.chkItemsBottomClick┤ │   │ │ │ 
                 TfrmGraphs.mnuPopGraphIsolateClick┤ │   │ │ │ 
                      TfrmGraphs.cboDateRangeChange┤ │   │ │ │ 
                    TfrmReports.lstDateRangeClick┤ │ │   │ │ │ 
                         TfrmReports.GraphPanel┘ │ │ │   │ │ │ 
                         TfrmReports.Graph...┤   │ │ │   │ │ │ 
                TfrmReports.tvReportsClick...┘   │ │ │   │ │ │ 
                            TfrmGraphs.Initialize┤ │ │   │ │ │ 
                      TfrmFrame.ClearPatient...┤ │ │ │   │ │ │ 
                TfrmFrame.mnuToolsGraphingClick┤ │ │ │   │ │ │ 
                         TfrmLabs.grdLabClick┤ │ │ │ │   │ │ │ 
                      TfrmLabs.tvReportsClick┤ │ │ │ │   │ │ │ 
                       TfrmLabs.DisplayPage┤ │ │ │ │ │   │ │ │ 
                      TfrmLabs.LoadTreeView┤ │ │ │ │ │   │ │ │ 
                     TfrmLabs.DisplayPage┤ │ │ │ │ │ │   │ │ │ 
TfrmOptionsReportsCustom.btnApplyClick...┘ │ │ │ │ │ │   │ │ │ 
                TfrmLabs.cmdOtherTestsClick┤ │ │ │ │ │   │ │ │ 
                   TfrmLabs.chkMaxFreqClick┤ │ │ │ │ │   │ │ │ 
              TfrmLabs.ProcessNotifications┤ │ │ │ │ │   │ │ │ 
                     TfrmLabs.DisplayPage┘ │ │ │ │ │ │   │ │ │ 
                                  ..(rec)..┤ │ │ │ │ │   │ │ │ 
                  TfrmLabs.tvReportsKeyDown┤ │ │ │ │ │   │ │ │ 
         TfrmFrame.lstCIRNLocationsClick...┘ │ │ │ │ │   │ │ │ 
                                    ..(rec)..┘ │ │ │ │   │ │ │ 
                     TfrmReports.ClearPtData...┤ │ │ │   │ │ │ 
                           TfrmReports.Graph...┘ │ │ │   │ │ │ 
                              TfrmGraphs.FormShow┤ │ │   │ │ │ 
                TfrmGraphs.btnChangeSettingsClick┤ │ │   │ │ │ 
                 TfrmReports.btnChangeViewClick┘ │ │ │   │ │ │ 
                     TfrmGraphs.CheckExpandedLabs┤ │ │   │ │ │ 
                          TfrmGraphs.ItemsClick┘ │ │ │   │ │ │ 
                    TfrmGraphs.DisplayData...┤   │ │ │   │ │ │ 
               TfrmGraphs.lvwItemsBottomClick┤   │ │ │   │ │ │ 
                   TfrmGraphs.Initialize...┤ │   │ │ │   │ │ │ 
                    TfrmGraphs.CheckContext┤ │   │ │ │   │ │ │ 
                      TfrmGraphs.FormShow┘ │ │   │ │ │   │ │ │ 
               TfrmGraphs.chkDualViewsClick┤ │   │ │ │   │ │ │ 
                 TfrmGraphs.Initialize...┤ │ │   │ │ │   │ │ │ 
                      TfrmGraphs.FormShow┤ │ │   │ │ │   │ │ │ 
                                   Layout┤ │ │   │ │ │   │ │ │ 
                     TfrmGraphs.GetSize┘ │ │ │   │ │ │   │ │ │ 
                  TfrmGraphs.FormShow┘   │ │ │   │ │ │   │ │ │ 
     TfrmGraphs.mnuPopGraphDualViewsClick┤ │ │   │ │ │   │ │ │ 
                TfrmGraphs.ViewSelections┘ │ │   │ │ │   │ │ │ 
          TfrmReports.tvReportsClick...┤   │ │   │ │ │   │ │ │ 
     TfrmGraphs.btnGraphSelectionsClick┘   │ │   │ │ │   │ │ │ 
  TfrmReports.btnGraphSelectionsClick┘     │ │   │ │ │   │ │ │ 
                     TfrmGraphs.GraphSwitch┤ │   │ │ │   │ │ │ 
                     TfrmGraphs.GraphSwap┘ │ │   │ │ │   │ │ │ 
        TfrmGraphs.mnuPopGraphSwapClick┘   │ │   │ │ │   │ │ │ 
                      TfrmGraphs.SplitClick┤ │   │ │ │   │ │ │ 
         TfrmGraphs.mnuPopGraphSplitClick┘ │ │   │ │ │   │ │ │ 
           TfrmGraphs.mnuPopGraphClearClick┤ │   │ │ │   │ │ │ 
                      TfrmGraphs.AutoSelect┤ │   │ │ │   │ │ │ 
                   TfrmGraphs.ViewsChange┘ │ │   │ │ │   │ │ │ 
           TfrmGraphs.lstViewsTopChange┤   │ │   │ │ │   │ │ │ 
             TfrmGraphs.Initialize...┤ │   │ │   │ │ │   │ │ │ 
            TfrmGraphs.GraphSwitch...┤ │   │ │   │ │ │   │ │ │ 
     TfrmGraphs.cboDateRangeChange...┤ │   │ │   │ │ │   │ │ │ 
         TfrmGraphs.ViewSelections...┘ │   │ │   │ │ │   │ │ │ 
        TfrmGraphs.lstViewsBottomChange┘   │ │   │ │ │   │ │ │ 
             TfrmGraphs.Initialize...┤     │ │   │ │ │   │ │ │ 
            TfrmGraphs.GraphSwitch...┤     │ │   │ │ │   │ │ │ 
     TfrmGraphs.cboDateRangeChange...┤     │ │   │ │ │   │ │ │ 
         TfrmGraphs.ViewSelections...┘     │ │   │ │ │   │ │ │ 
            TfrmGraphs.lvwItemsBottomChange┘ │   │ │ │   │ │ │ 
                  TfrmGraphs.lvwItemsTopClick┘   │ │ │   │ │ │ 
                   TfrmGraphs.Initialize...┤     │ │ │   │ │ │ 
                        TfrmGraphs.FormShow┤     │ │ │   │ │ │ 
            TfrmGraphs.chkDualViewsClick...┤     │ │ │   │ │ │ 
                  TfrmGraphs.GraphSwitch...┤     │ │ │   │ │ │ 
                   TfrmGraphs.SplitClick...┤     │ │ │   │ │ │ 
           TfrmGraphs.mnuPopGraphClearClick┤     │ │ │   │ │ │ 
                   TfrmGraphs.AutoSelect...┤     │ │ │   │ │ │ 
           TfrmGraphs.mnuPopGraphResetClick┤     │ │ │   │ │ │ 
                      TfrmGraphs.FormShow┤ │     │ │ │   │ │ │ 
    TfrmGraphs.mnuPopGraphHorizontalClick┤ │     │ │ │   │ │ │ 
      TfrmGraphs.mnuPopGraphVerticalClick┤ │     │ │ │   │ │ │ 
        TfrmGraphs.mnuPopGraphRemoveClick┤ │     │ │ │   │ │ │ 
      TfrmGraphs.mnuPopGraphZoomBackClick┘ │     │ │ │   │ │ │ 
               TfrmGraphs.lvwItemsTopChange┘     │ │ │   │ │ │ 
                        TfrmGraphs.ViewsChange...┤ │ │   │ │ │ 
             TfrmGraphs.mnuPopGraphMergeLabsClick┘ │ │   │ │ │ 
                           TfrmGraphs.ItemsClick...┤ │   │ │ │ 
                          TfrmGraphs.ViewsChange...┤ │   │ │ │ 
                  TfrmGraphs.mnuPopGraphRemoveClick┘ │   │ │ │ 
                         TfrmGraphs.MakeTogetherMaybe┘   │ │ │ 
                          TfrmGraphs.DisplayData...┘     │ │ │ 
                                  TfrmGraphs.MakeTogether┘ │ │ 
                        TfrmGraphs.MakeTogetherMaybe...┘   │ │ 
                                      TfrmGraphs.BaseResize┤ │ 
                        TfrmGraphs.pnlScrollTopBaseResize┘ │ │ 
                          TfrmGraphs.pnlScrollTopBaseResize┘ │ 
                                   TfrmGraphs.ChartOnUndoZoom┤ 
                                    TfrmGraphs.MakeChart...┤ │ 
                                 TfrmGraphs.MakeNonNumerics┘ │ 
                               TfrmGraphs.MakeOtherSeries┘   │ 
                        TfrmGraphs.MakeSeparateItems...┤     │ 
                             TfrmGraphs.MakeTogether...┘     │ 
                                            TfrmGraphs.ZoomTo┘ 
                                      TfrmGraphs.ZoomUpdate┘   
                                 TfrmGraphs.ItemsClick...┤     
                      TfrmGraphs.mnuPopGraphZoomBackClick┘     

Calls

Name Declaration Comments
TfrmGraphs.GraphFooter procedure GraphFooter(aChart: TChart; datediff: integer; aDate: TDateTime); -
TfrmGraphs.SeriesForLabels procedure SeriesForLabels(aChart: TChart; aID: string; pad: double); -

Called-By

Name Declaration Comments
TfrmGraphs.ChartOnUndoZoom procedure ChartOnUndoZoom(Sender: TObject); -
TfrmGraphs.ChartOnZoom procedure ChartOnZoom(Sender: TObject); -
TfrmGraphs.ZoomTo procedure ZoomTo(SmallTime, BigTime: TDateTime); -


Source

1937  procedure TfrmGraphs.SizeDates(aChart: TChart; aSmallTime, aBigTime: TDateTime);
1938  var
1939    datediff, yeardiff: integer;
1940    pad: double;
1941  begin
1942    with aChart.BottomAxis do
1943    begin
1944      Automatic := false;
1945      Maximum := BIG_NUMBER;    // avoid min>max error
1946      Minimum := -BIG_NUMBER;
1947      Minimum := aSmallTime;
1948      Maximum := aBigTime;
1949      Increment := DateTimeStep[dtOneMinute];
1950      datediff := DaysBetween(aBigTime, aSmallTime);
1951      yeardiff := datediff div 365;
1952      DateTimeFormat := '';
1953      Labels := true;
1954      if yeardiff > 0 then
1955      begin
1956        if (pnlScrollTopBase.Width div yeardiff) < DWIDTH_MDY then
1957          DateTimeFormat := DFORMAT_MYY;
1958        if (pnlScrollTopBase.Width div yeardiff) < DWIDTH_MYY then
1959          DateTimeFormat := DFORMAT_YY;
1960        if (pnlScrollTopBase.Width div yeardiff) < DWIDTH_YY then
1961          Labels := false;
1962      end;
1963    end;
1964    GraphFooter(aChart, datediff, aSmallTime);
1965    pad := (aBigTime - aSmallTime) * 0.07;
1966    SeriesForLabels(aChart, 'serNonNumBottom', pad);
1967    SeriesForLabels(aChart, 'serNonNumTop', pad);
1968    if length(aChart.Hint) > 0 then SeriesForLabels(aChart, 'serComments', pad);
1969  end;