Exemple #1
0
 private void Chart_MouseUp(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         chart.Cursor = Cursors.Default;
         mode         = mode ^ EChartViewMode.Drag;
     }
 }
Exemple #2
0
 private void Chart_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         chart.Cursor   = Cursors.Hand;
         mode           = mode | EChartViewMode.Drag;
         startDragPoint = e.Location;
     }
 }
Exemple #3
0
 private void SetSpyMode(object sender, EventArgs e)
 {
     if ((mode & EChartViewMode.Spy) == EChartViewMode.Spy)
     {
         mode = mode ^ EChartViewMode.Spy;
     }
     else
     {
         mode = mode | EChartViewMode.Spy;
     }
 }
Exemple #4
0
 private void FitToView(object sender, EventArgs e)
 {
     mode = EChartViewMode.Auto;
     chart.BeginInvoke((MethodInvoker)(() =>
     {
         this.spyBtn.Checked = false;
         if (chart.ChartAreas.Count > 0)
         {
             chart.ChartAreas[0].AxisX.Minimum = double.NaN;
             chart.ChartAreas[0].AxisX.Maximum = double.NaN;
             chart.ChartAreas[0].AxisY.Minimum = double.NaN;
             chart.ChartAreas[0].AxisY.Maximum = double.NaN;
             chart.ChartAreas[0].AxisX.ScaleView.ZoomReset(0);
             chart.ChartAreas[0].AxisY.ScaleView.ZoomReset(0);
         }
     }));
 }