private static CameraInfo GetOrCreateCameraInfo(RadCartesianChart chart) { CameraInfo cameraInfo = (CameraInfo)chart.GetValue(CameraInfoProperty); if (cameraInfo == null) { cameraInfo = new CameraInfo(); chart.SetValue(CameraInfoProperty, cameraInfo); } return(cameraInfo); }
public MainPage() { InitializeComponent(); RadCartesianChart chart = new RadCartesianChart(); chart.HorizontalAxis = new CategoricalAxis(); chart.VerticalAxis = new LinearAxis() { Maximum = 100 }; LineSeries line = new LineSeries(); line.Stroke = new SolidColorBrush(Colors.Orange); line.StrokeThickness = 2; line.DataPoints.Add(new CategoricalDataPoint() { Value = 20 }); line.DataPoints.Add(new CategoricalDataPoint() { Value = 40 }); line.DataPoints.Add(new CategoricalDataPoint() { Value = 35 }); line.DataPoints.Add(new CategoricalDataPoint() { Value = 40 }); line.DataPoints.Add(new CategoricalDataPoint() { Value = 30 }); line.DataPoints.Add(new CategoricalDataPoint() { Value = 50 }); chart.Series.Add(line); chart.SetValue(Grid.ColumnProperty, 1); this.LayoutRoot.Children.Add(chart); }
public MainPage() { InitializeComponent(); RadCartesianChart chart = new RadCartesianChart(); chart.HorizontalAxis = new CategoricalAxis(); chart.VerticalAxis = new LinearAxis() { Maximum = 100 }; LineSeries line = new LineSeries(); line.Stroke = new SolidColorBrush(Colors.Orange); line.StrokeThickness = 2; line.DataPoints.Add(new CategoricalDataPoint() { Value = 20 }); line.DataPoints.Add(new CategoricalDataPoint() { Value = 40 }); line.DataPoints.Add(new CategoricalDataPoint() { Value = 35 }); line.DataPoints.Add(new CategoricalDataPoint() { Value = 40 }); line.DataPoints.Add(new CategoricalDataPoint() { Value = 30 }); line.DataPoints.Add(new CategoricalDataPoint() { Value = 50 }); chart.Series.Add(line); chart.SetValue(Grid.ColumnProperty, 1); this.LayoutRoot.Children.Add(chart); }
private static CameraInfo GetOrCreateCameraInfo(RadCartesianChart chart) { CameraInfo cameraInfo = (CameraInfo)chart.GetValue(CameraInfoProperty); if (cameraInfo == null) { cameraInfo = new CameraInfo(); chart.SetValue(CameraInfoProperty, cameraInfo); } return cameraInfo; }