Ejemplo n.º 1
0
        public void InvalidAxisKey()
        {
            var model = new PlotModel();

            model.Axes.Add(new LinearAxis());
            model.Series.Add(new LineSeries {
                XAxisKey = "invalidKey"
            });
            ((IPlotModel)model).Update(true);
            Assert.IsNotNull(model.GetLastPlotException() as InvalidOperationException);
        }
Ejemplo n.º 2
0
        public void D01_InvalidAbsoluteMaxMin()
        {
            var plot = new PlotModel {
                Title = "Simple plot"
            };

            plot.Axes.Add(new LinearAxis {
                AbsoluteMaximum = 0, AbsoluteMinimum = 0
            });
            ((IPlotModel)plot).Update(true);
            Assert.IsNotNull(plot.GetLastPlotException() as InvalidOperationException);
        }
Ejemplo n.º 3
0
        public void PlotInifityPolyline()
        {
            var model  = new PlotModel();
            var series = new OxyPlot.Series.LineSeries();

            series.Points.Add(new DataPoint(0, 0));
            series.Points.Add(new DataPoint(1, -1e40));
            model.Series.Add(series);

            var view = new PlotView {
                Model = model
            };
            var window = new Window {
                Height = 350, Width = 500, Content = view
            };

            Assert.DoesNotThrow(() => window.Show());
            Assert.IsNull(model.GetLastPlotException());
        }
Ejemplo n.º 4
0
 public void D01_InvalidAbsoluteMaxMin()
 {
     var plot = new PlotModel { Title = "Simple plot" };
     plot.Axes.Add(new LinearAxis { AbsoluteMaximum = 0, AbsoluteMinimum = 0 });
     ((IPlotModel)plot).Update(true);
     Assert.IsNotNull(plot.GetLastPlotException() as InvalidOperationException);
 }
Ejemplo n.º 5
0
 public void InvalidAxisKey()
 {
     var model = new PlotModel();
     model.Axes.Add(new LinearAxis());
     model.Series.Add(new LineSeries { XAxisKey = "invalidKey" });
     ((IPlotModel)model).Update(true);
     Assert.IsNotNull(model.GetLastPlotException() as InvalidOperationException);
 }