Esempio n. 1
0
 private static void OnScaleChange(DependencyObject o, DependencyPropertyChangedEventArgs ea)
 {
     TimeChartControl tcc = o as TimeChartControl;/*
                                                   * ((LinearAxis)tcc._chart.Axes[1]).Minimum = tcc.ChartScale.X;
                                                   * ((LinearAxis)tcc._chart.Axes[1]).Maximum = tcc.ChartScale.Y;
                                                   * ((LinearAxis)tcc._chart.Axes[1]).Interval = (tcc.ChartScale.Y - tcc.ChartScale.X) / 5;
                                                   * tcc._chart.Refresh();*/
 }
Esempio n. 2
0
 private static void OnPeriodChange(DependencyObject o, DependencyPropertyChangedEventArgs ea)
 {
     if (Env.Current.Mode != EnvironmentMode.Runtime)
     {
         TimeChartControl tcc = o as TimeChartControl;
         //((DateTimeAxis)tcc._chart.Axes[0]).Minimum = DateTime.Now.AddSeconds(-tcc.ChartPeriod / 2);
         //((DateTimeAxis)tcc._chart.Axes[0]).Maximum = DateTime.Now.AddSeconds(tcc.ChartPeriod / 2);
         //((DateTimeAxis)tcc._chart.Axes[0]).Interval=tcc.ChartPeriod/5;
         //(tcc._chart.HorizontalAxis as HorizontalDateTimeAxis).LabelProvider.LabelStringFormat
         tcc._chart.FitToView();
     }
 }