Procedure

TfrmGraphs.ChartOnUndoZoom

Module

fGraphs

Last Modified

7/15/2014 3:26:36 PM

Visibility

Public/Published

Owner

TfrmGraphs

Declaration

procedure ChartOnUndoZoom(Sender: TObject);

Calls Hierarchy


TfrmGraphs.ChartOnUndoZoom
 ├TfrmGraphs.SizeDates
 │ ├TfrmGraphs.GraphFooter
 │ └TfrmGraphs.SeriesForLabels
 ├TfrmGraphs.InfoMessage
 └TfrmGraphs.MergedLabsSelected

Called-By Hierarchy


                                   TfrmGraphs.ChartOnUndoZoom
                                       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.MakeNonNumerics┘ 
                               TfrmGraphs.MakeOtherSeries┘   
                        TfrmGraphs.MakeSeparateItems...┤     
                             TfrmGraphs.MakeTogether...┘     

Calls

Name Declaration Comments
TfrmGraphs.InfoMessage procedure InfoMessage(aCaption: string; aColor: TColor; aVisible: boolean); -
TfrmGraphs.MergedLabsSelected function MergedLabsSelected: boolean; -
TfrmGraphs.SizeDates procedure SizeDates(aChart: TChart; aSmallTime, aBigTime: TDateTime); -

Called-By

Name Declaration Comments
TfrmGraphs.MakeChart procedure MakeChart(aChart: TChart; aScrollBox: TScrollBox); -
TfrmGraphs.MakeNonNumerics procedure MakeNonNumerics(aChart: TChart); -


Source

1891  procedure TfrmGraphs.ChartOnUndoZoom(Sender: TObject);
1892  var
1893    i: integer;
1894    padding: double;
1895    BigTime, SmallTime: TDateTime;
1896    ChildControl: TControl;
1897    aChart: TChart;
1898  begin
1899    if not (Sender is TChart) then exit;
1900    aChart:= (Sender as TChart);
1901    FRetainZoom := false;
1902    mnuPopGraphZoomBack.Enabled := false;
1903    GtslZoomHistoryFloat.Clear;
1904    if not FGraphSetting.VerticalZoom then
1905    begin
1906      padding := 0; //(FYMaxValue - FYMinValue) * ((100 - ZOOM_PERCENT) * 0.01);
1907      aChart.LeftAxis.Maximum := BIG_NUMBER;    // avoid min>max error
1908      aChart.LeftAxis.Minimum := -BIG_NUMBER;
1909      aChart.LeftAxis.Maximum := FYMaxValue + padding;    //padding 0?
1910      aChart.LeftAxis.Minimum := FYMinValue - padding;    //padding 0?
1911    end;
1912    SmallTime := aChart.BottomAxis.Minimum;
1913    BigTime := aChart.BottomAxis.Maximum;
1914    if BigTime < SmallTime then BigTime := SmallTime;   // avoid min>max error
1915    for i := 0 to scrlTop.ControlCount - 1 do
1916    begin
1917      ChildControl := scrlTop.Controls[i];
1918      SizeDates((ChildControl as TChart), SmallTime, BigTime);
1919    end;
1920    SizeDates(chartDatelineTop, SmallTime, BigTime);
1921    for i := 0 to scrlBottom.ControlCount - 1 do
1922    begin
1923      ChildControl := scrlBottom.Controls[i];
1924      SizeDates((ChildControl as TChart), SmallTime, BigTime);
1925    end;
1926    SizeDates(chartDatelineBottom, SmallTime, BigTime);
1927    if FMouseDown then
1928    begin
1929      FMouseDown := false;
1930      InfoMessage('', COLOR_INFO, false);
1931    if MergedLabsSelected then
1932      InfoMessage(TXT_WARNING_MERGED_LABS, COLOR_WARNING, true);
1933    pnlHeader.Visible := pnlInfo.Visible;
1934    end;
1935  end;