예제 #1
0
        public CartesianChart()
        {
            LiveChartsSK.Register();
            InitializeComponent();

            if (!(FindByName("canvas") is NaturalVisualCanvas canvas))
            {
                throw new Exception(
                          $"SkiaElement not found. This was probably caused because the control {nameof(CartesianChart)} template was overridden, " +
                          $"If you override the template please add an {nameof(NaturalVisualCanvas)} to the template and name it 'canvas'");
            }

            core = new CartesianChart <SkiaSharpDrawingContext>(this, canvas.CanvasCore);
            core.Update();

            SizeChanged += CartesianChart_SizeChanged;
        }
예제 #2
0
 public CartesianChart()
 {
     LiveChartsSK.Register();
     InitializeComponent();
 }