public CartesianChart()
        {
            var freq    = DisableAnimations ? TimeSpan.FromMilliseconds(10) : AnimationsSpeed;
            var updater = new Components.ChartUpdater(freq);

            ChartCoreModel = new CartesianChartCore(this, updater);
        }
Exemple #2
0
        public CartesianChart()
        {
            var freq    = DisableAnimations ? TimeSpan.FromMilliseconds(10) : AnimationsSpeed;
            var updater = new Components.ChartUpdater(freq);

            ChartCoreModel = new CartesianChartCore(this, updater);

            SetValue(VisualElementsProperty, new VisualElementsCollection());
        }
Exemple #3
0
        /// <summary>
        /// Initializes a new instance of CartesianChart class
        /// </summary>
        public CartesianChart()
        {
            var freq    = DisableAnimations ? TimeSpan.FromMilliseconds(10) : AnimationsSpeed;
            var updater = new Components.ChartUpdater(freq);

            ChartCoreModel = new CartesianChartCore(this, updater);

            SetCurrentValue(SeriesProperty,
                            DesignerProperties.GetIsInDesignMode(this)
                    ? GetDesignerModeCollection()
                    : new SeriesCollection());

            SetCurrentValue(VisualElementsProperty, new VisualElementsCollection());
        }
Exemple #4
0
        /// <summary>
        /// Initializes a new instance of CartesianChart class
        /// </summary>
        public CartesianChart()
        {
            var freq    = DisableAnimations ? TimeSpan.FromMilliseconds(10) : AnimationsSpeed;
            var updater = new Components.ChartUpdater(freq);

            ChartCoreModel = new CartesianChartCore(this, updater);

            SetValue(SeriesProperty,
                     Windows.ApplicationModel.DesignMode.DesignModeEnabled
                    ? GetDesignerModeCollection()
                    : new SeriesCollection());

            this.SetIfNotSet(VisualElementsProperty, new VisualElementsCollection());
        }
Exemple #5
0
        public CartesianChart()
        {
            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 CartesianChartCore <SkiaDrawingContext>(this, canvas.CanvasCore);
            core.Update();

            SizeChanged += CartesianChart_SizeChanged;
        }
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

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

            this.canvas = canvas;
            core        = new CartesianChartCore <SkiaDrawingContext>(this, canvas.CanvasCore);
            legend      = Template.FindName("legend", this) as IChartLegend <SkiaDrawingContext>;
            tooltip     = Template.FindName("tooltip", this) as IChartTooltip <SkiaDrawingContext>;
            core.Update();
        }
Exemple #7
0
 public void Test1()
 {
     var chart = new CartesianChartCore(_view, _updater);
     //_view.ActualSeries
 }