Ejemplo n.º 1
0
 // sets x axis range for chart depending on what needs to be shown based on chart properties
 public void setAxisXRange(Chart chart, ChartDataInformation cdi)
 {
     if (isMultipleIntervals(cdi) && ShowInBetweenIntervals) // if multiple data points exist
     {
         // set maximum to end interval, minimum to start interval
         chart.ChartAreas[0].AxisX.Maximum = cdi.SelectedEndInterval.Number;
         chart.ChartAreas[0].AxisX.Minimum = cdi.SelectedStartInterval.Number;
     }
     else if (isMultipleIntervals(cdi) && !ShowInBetweenIntervals) // if only show start and end intervals
     {
         // set maximum to 1 (end interval) and minimum to 0 (start interval)
         chart.ChartAreas[0].AxisX.Maximum = 1;
         chart.ChartAreas[0].AxisX.Minimum = 0;
     }
     else if (!isMultipleIntervals(cdi)) // if only one interval (eg baseline to baseline)
     {
         // sort of "hacky" in order to get the one singular label to format correctly, since setting both the maximum and minimum to zero caused issues with the chart control
         chart.ChartAreas[0].AxisX.Maximum = .5;
         chart.ChartAreas[0].AxisX.Minimum = 0;
     }
 }
Ejemplo n.º 2
0
 public bool isMultipleIntervals(ChartDataInformation cdi)
 {
     return(cdi.SelectedEndInterval.Number - cdi.SelectedStartInterval.Number != 0);
 }
Ejemplo n.º 3
0
 public ChartData()
 {
     cdi = new ChartDataInformation();
     cds = new ChartDataSettings();
 }