Procedure

TfrmGraphs.MakeNonNumerics

Module

fGraphs

Last Modified

7/15/2014 3:26:36 PM

Visibility

Private

Owner

TfrmGraphs

Declaration

procedure MakeNonNumerics(aChart: TChart);

Calls Hierarchy


TfrmGraphs.MakeNonNumerics
 ├TfrmGraphs.PadNonNum
 │ ├TfrmGraphs.StackNonNum
 │ └TfrmGraphs.MakeSeriesPoint
 ├TfrmGraphs.MakeSeriesPoint
 ├TfrmGraphs.PadLeftNonNumeric
 ├TfrmGraphs.ChartOnUndoZoom
 │ ├TfrmGraphs.SizeDates
 │ │ ├TfrmGraphs.GraphFooter
 │ │ └TfrmGraphs.SeriesForLabels
 │ ├TfrmGraphs.InfoMessage
 │ └TfrmGraphs.MergedLabsSelected
 └TfrmGraphs.MakeNonNumSeries
   └TfrmGraphs.MakeSeriesPoint

Called-By Hierarchy


                                   TfrmGraphs.MakeNonNumerics
                                 TfrmGraphs.MakeOtherSeries┘ 
                             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...┘     

Calls

Name Declaration Comments
TfrmGraphs.ChartOnUndoZoom procedure ChartOnUndoZoom(Sender: TObject); -
TfrmGraphs.MakeNonNumSeries procedure MakeNonNumSeries(aChart: TChart; padvalue, highestvalue, lowestvalue: double; listofseries, section: string); -
TfrmGraphs.MakeSeriesPoint procedure MakeSeriesPoint(aChart: TChart; aPointSeries: TPointSeries); -
TfrmGraphs.PadLeftNonNumeric function PadLeftNonNumeric(aWidth: integer): integer; -
TfrmGraphs.PadNonNum procedure PadNonNum(aChart: TChart; aSection: string; var listofseries: string; var bmax, tmax: integer); -

Called-By

Name Declaration Comments
TfrmGraphs.MakeOtherSeries procedure MakeOtherSeries(aChart: TChart); -


Source

2703  procedure TfrmGraphs.MakeNonNumerics(aChart: TChart);
2704  var
2705    nonnumericonly, nonnumsection: boolean;
2706    i, bmax, tmax: integer;
2707    diffvalue, highestvalue, lowestvalue, padvalue: double;
2708    astring, listofseries, section: string;
2709    serBlank: TPointSeries;
2710  begin
2711    if aChart.Parent = scrlBottom then section := 'bottom'
2712    else section := 'top';
2713    nonnumericonly := true;
2714    for i := 0 to aChart.SeriesCount - 1 do
2715    begin
2716      if (aChart.Series[i] is TLineSeries) then
2717        if aChart.Series[i].Count > 0 then
2718        begin
2719          nonnumericonly := false;
2720          break;
2721        end;
2722    end;
2723    PadNonNum(aChart, section, listofseries, bmax, tmax);
2724    if bmax = 0 then bmax := 1;
2725    if tmax = 0 then tmax := 1;
2726    if nonnumericonly then
2727    begin
2728      highestvalue := 1;
2729      lowestvalue := 0;
2730    end
2731    else
2732    begin
2733      highestvalue := aChart.MaxYValue(aChart.LeftAxis);
2734      lowestvalue := aChart.MinYValue(aChart.LeftAxis);
2735    end;
2736    diffvalue := highestvalue - lowestvalue;
2737    if diffvalue = 0 then
2738      padvalue := highestvalue / 2
2739    else
2740      padvalue := POINT_PADDING * diffvalue;
2741    highestvalue := highestvalue + (tmax * padvalue);
2742    lowestvalue := lowestvalue - (bmax * padvalue);
2743    if not (aChart.MinYValue(aChart.LeftAxis) < 0) then
2744    begin
2745      if highestvalue < 0 then highestvalue := 0;
2746      if lowestvalue < 0 then lowestvalue := 0;
2747    end;
2748    if lowestvalue > highestvalue then
2749       lowestvalue := highestvalue;
2750    aChart.LeftAxis.Maximum := highestvalue;
2751    aChart.LeftAxis.Minimum := lowestvalue;
2752    nonnumsection := false;
2753    for i := 0 to GtslNonNum.Count - 1 do
2754    begin
2755      astring := GtslNonNum[i];
2756      if Piece(astring, '^', 7) = section then
2757      begin
2758        nonnumsection := true;
2759        break;
2760      end;
2761    end;
2762    if nonnumericonly and nonnumsection then
2763    begin
2764      serBlank := TPointSeries.Create(aChart);
2765      MakeSeriesPoint(aChart, serBlank);
2766      with serBlank do
2767      begin
2768        AddXY(aChart.BottomAxis.Minimum, highestvalue, '', aChart.Color);
2769        AddXY(aChart.BottomAxis.Minimum, lowestvalue, '', aChart.Color);
2770      end;
2771      aChart.LeftAxis.Labels := false;
2772      aChart.MarginLeft := PadLeftNonNumeric(pnlScrollTopBase.Width);
2773      //aChart.MarginLeft := round((40 / (pnlScrollTopBase.Width + 1)) * 100);       // ************* marginleft is a %
2774      ChartOnUndoZoom(aChart);
2775    end;
2776    MakeNonNumSeries(aChart, padvalue, highestvalue, lowestvalue, listofseries, section);
2777  end;