Exemplo n.º 1
0
        private void Clear()
        {
            if (sciChart.RenderableSeries == null)
            {
                return;
            }

            if (sciChart.RenderableSeries.Any())
            {
                var rSeries = sciChart.RenderableSeries.LastOrDefault();

                if (rSeries == null || rSeries.DataSeries == null)
                {
                    return;
                }

                MeshDataSeries.Clear();
                //sciChart.RenderableSeries.Remove(rSeries);

                OnPropertyChanged("CanAddSeries");
                OnPropertyChanged("CanRemoveSeries");

                sciChart.ZoomExtents();
            }
        }
Exemplo n.º 2
0
        public void Init(int row, int col)
        {
            xSize = row;
            zSize = col;
            yMax  = float.MinValue;

            if (positionInfo == null)
            {
                positionInfo = new List <PositionInfo>();
            }
            else
            {
                positionInfo.Clear();
            }

            if (drawInfo == null)
            {
                drawInfo = new List <DrawGeometry>();
            }
            else
            {
                drawInfo.Clear();
            }

            if (MeshDataSeries == null)
            {
                MeshDataSeries = new UniformGridDataSeries3D <double, double, double>(xSize, zSize);
            }
            else
            {
                MeshDataSeries.Clear();
            }

            if (marker == null)
            {
                marker = new XyzDataSeries3D <double>();
                marker.DataSeriesChanged += OnScatterSelected;
            }
            else
            {
                marker.Clear();
            }

            movePoint   = false;
            annotIdx    = -1; // 0 base
            selectedIdx = -1;
        }
Exemplo n.º 3
0
        public void ClearPoints()
        {
            if (positionInfo == null || drawInfo == null || marker == null)
            {
                return;
            }

            positionInfo.Clear();
            for (int i = 0; i < drawInfo.Count; i++)
            {
                sciChart.Viewport3D.RootEntity.Children.Remove(drawInfo[i]);
            }
            drawInfo.Clear();
            marker.Clear();
            scatterRenderableSeries.DataSeries = null;
            annotIdx = -1;

            if (sciChart.RenderableSeries.Any())
            {
                var rSeries = sciChart.RenderableSeries.LastOrDefault();

                if (rSeries == null || rSeries.DataSeries == null)
                {
                    return;
                }

                //sciChart.RenderableSeries.Remove(rSeries);

                MeshDataSeries.Clear();

                OnPropertyChanged("CanAddSeries");
                OnPropertyChanged("CanRemoveSeries");

                //sciChart.ZoomExtents();
                sciChart.ZoomExtentsX();
                sciChart.ZoomExtentsZ();
            }
        }