Skip to content

Raise Exception when displaying large amount of Points #18

Description

@ShannonZ
namespace SimpleDemo
{
    using OxyPlot;
    using OxyPlot.Axes;
    using OxyPlot.Series;
    using System;

    public class MainViewModel
    {
        public MainViewModel()
        {
            var model = new PlotModel { Title = "Hello SharpDX from WPF" };
            model.Axes.Add(new LinearAxis { Position = AxisPosition.Bottom });
            model.Axes.Add(new LinearAxis { Position = AxisPosition.Left, Title="Left Axis Title" });
            var lineSeries = new LineSeries { Title = "LineSeries", MarkerType = MarkerType.Circle };
            Random rn = new Random();
            for (int i = 0; i < **1e5**; i++)
            {
                lineSeries.Points.Add(new DataPoint(i, rn.NextDouble()));
            }
            
            model.Series.Add(lineSeries);
            this.Model = model;
        }

        public PlotModel Model { get; private set; }
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions