Пример #1
0
        internal static Panel GetVisualObject(Panel preExistingPanel, RenderAs chartType, Double width, Double height, PlotDetails plotDetails, List <DataSeries> dataSeriesList4Rendering, Chart chart, Double plankDepth, bool animationEnabled)
        {
            Panel renderedCanvas = null;

            switch (chartType)
            {
            case RenderAs.Column:
                renderedCanvas = ColumnChart.GetVisualObjectForColumnChart(preExistingPanel, width, height, plotDetails, dataSeriesList4Rendering, chart, plankDepth, animationEnabled);
                break;

            case RenderAs.Bar:
                renderedCanvas = ColumnChart.GetVisualObjectForColumnChart(preExistingPanel, width, height, plotDetails, dataSeriesList4Rendering, chart, plankDepth, animationEnabled);

                //renderedCanvas = BarChart.GetVisualObjectForBarChart(preExistingPanel, width, height, plotDetails, dataSeriesList4Rendering, chart, plankDepth, animationEnabled);
                break;

            case RenderAs.Line:
                renderedCanvas = LineChart.GetVisualObjectForLineChart(preExistingPanel, width, height, plotDetails, dataSeriesList4Rendering, chart, plankDepth, animationEnabled);
                break;

            case RenderAs.Point:
                renderedCanvas = PointChart.GetVisualObjectForPointChart(preExistingPanel, width, height, plotDetails, dataSeriesList4Rendering, chart, plankDepth, animationEnabled);
                break;

            case RenderAs.Bubble:
                renderedCanvas = BubbleChart.GetVisualObjectForBubbleChart(preExistingPanel, width, height, plotDetails, dataSeriesList4Rendering, chart, plankDepth, animationEnabled);
                break;

            case RenderAs.Area:
                renderedCanvas = AreaChart.GetVisualObjectForAreaChart(preExistingPanel, width, height, plotDetails, dataSeriesList4Rendering, chart, plankDepth, animationEnabled);
                break;

            case RenderAs.StackedColumn:
                renderedCanvas = ColumnChart.GetVisualObjectForStackedColumnChart(chartType, preExistingPanel, width, height, plotDetails, chart, plankDepth, animationEnabled);
                break;

            case RenderAs.StackedColumn100:
                renderedCanvas = ColumnChart.GetVisualObjectForStackedColumnChart(chartType, preExistingPanel, width, height, plotDetails, chart, plankDepth, animationEnabled);

                //renderedCanvas = ColumnChart.GetVisualObjectForStackedColumn100Chart(width, height, plotDetails, chart, plankDepth, animationEnabled);
                break;

            case RenderAs.StackedBar:
                renderedCanvas = BarChart.GetVisualObjectForStackedBarChart(chartType, preExistingPanel, width, height, plotDetails, chart, plankDepth, animationEnabled);
                break;

            case RenderAs.StackedBar100:
                renderedCanvas = BarChart.GetVisualObjectForStackedBarChart(chartType, preExistingPanel, width, height, plotDetails, chart, plankDepth, animationEnabled);

                // renderedCanvas = BarChart.GetVisualObjectForStackedBar100Chart(width, height, plotDetails, chart, plankDepth, animationEnabled);
                break;

            case RenderAs.Pie:
                renderedCanvas = PieChart.GetVisualObjectForPieChart(width, height, plotDetails, dataSeriesList4Rendering, chart, animationEnabled);
                break;

            case RenderAs.Doughnut:
                renderedCanvas = PieChart.GetVisualObjectForDoughnutChart(width, height, plotDetails, dataSeriesList4Rendering, chart, animationEnabled);
                break;

            case RenderAs.StackedArea:
                renderedCanvas = AreaChart.GetVisualObjectForStackedAreaChart(preExistingPanel, width, height, plotDetails, dataSeriesList4Rendering, chart, plankDepth, animationEnabled);
                break;

            case RenderAs.StackedArea100:
                renderedCanvas = AreaChart.GetVisualObjectForStackedArea100Chart(preExistingPanel, width, height, plotDetails, dataSeriesList4Rendering, chart, plankDepth, animationEnabled);
                break;

            case RenderAs.SectionFunnel:
                renderedCanvas = FunnelChart.GetVisualObjectForFunnelChart(width, height, plotDetails, dataSeriesList4Rendering, chart, animationEnabled, false);

                break;

            case RenderAs.StreamLineFunnel:
                renderedCanvas = FunnelChart.GetVisualObjectForFunnelChart(width, height, plotDetails, dataSeriesList4Rendering, chart, animationEnabled, true);
                break;

            case RenderAs.Stock:
                renderedCanvas = StockChart.GetVisualObjectForStockChart(preExistingPanel, width, height, plotDetails, dataSeriesList4Rendering, chart, plankDepth, animationEnabled);
                break;

            case RenderAs.CandleStick:
                renderedCanvas = CandleStick.GetVisualObjectForCandleStick(preExistingPanel, width, height, plotDetails, dataSeriesList4Rendering, chart, plankDepth, animationEnabled);
                break;
            }

            return(renderedCanvas);
        }
Пример #2
0
        internal static void UpdateVisualObject(RenderAs chartType, Visifire.Commons.ObservableObject sender, VcProperties property, object newValue, Boolean isAXisChanged)
        {
            Boolean   isDataPoint = sender.GetType().Equals(typeof(DataPoint));
            DataPoint dataPoint   = sender as DataPoint;
            Chart     chart       = (sender as ObservableObject).Chart as Chart;

            switch (chartType)
            {
            case RenderAs.Column:
            case RenderAs.Bar:
                ColumnChart.Update(sender, property, newValue, isAXisChanged);
                //ColumnChart.GetVisualObjectForColumnChart(width, height, plotDetails, dataSeriesList4Rendering, chart, plankDepth, animationEnabled);
                break;

            // renderedCanvas = BarChart.GetVisualObjectForBarChart(width, height, plotDetails, dataSeriesList4Rendering, chart, plankDepth, animationEnabled);

            case RenderAs.Line:

                //if (isAXisChanged && isDataPoint && chart._partialUpdateAnimation)
                //{   foreach (DataSeries ds in chart.Series)
                //    {
                //        //if (ds == dataPoint.Parent)
                //        //    continue;

                //        foreach (DataPoint dp in ds.DataPoints)
                //        {
                //            RenderHelper.UpdateVisualObject(ds.RenderAs, dp, property, newValue, false);
                //        }
                //    }
                //}
                //else
                //    LineChart.Update(sender, property, newValue);

                LineChart.Update(sender, property, newValue, isAXisChanged);

                break;

            case RenderAs.Point:
                PointChart.Update(sender, property, newValue, isAXisChanged);
                //renderedCanvas = PointChart.GetVisualObjectForPointChart(width, height, plotDetails, dataSeriesList4Rendering, chart, plankDepth, animationEnabled);
                break;

            case RenderAs.Bubble:
                BubbleChart.Update(sender, property, newValue, isAXisChanged);
                //renderedCanvas = BubbleChart.GetVisualObjectForBubbleChart(width, height, plotDetails, dataSeriesList4Rendering, chart, plankDepth, animationEnabled);
                break;

            case RenderAs.Area:
                AreaChart.Update(sender, property, newValue, isAXisChanged);
                //renderedCanvas = AreaChart.GetVisualObjectForAreaChart(width, height, plotDetails, dataSeriesList4Rendering, chart, plankDepth, animationEnabled);
                break;

            case RenderAs.StackedColumn:
                ColumnChart.Update(sender, property, newValue, isAXisChanged);
                //renderedCanvas = ColumnChart.GetVisualObjectForStackedColumnChart(width, height, plotDetails, chart, plankDepth, animationEnabled);
                break;

            case RenderAs.StackedColumn100:
                ColumnChart.Update(sender, property, newValue, isAXisChanged);
                // renderedCanvas = ColumnChart.GetVisualObjectForStackedColumn100Chart(width, height, plotDetails, chart, plankDepth, animationEnabled);
                break;

            case RenderAs.StackedBar:
                ColumnChart.Update(sender, property, newValue, isAXisChanged);
                //renderedCanvas = BarChart.GetVisualObjectForStackedBarChart(width, height, plotDetails, chart, plankDepth, animationEnabled);
                break;

            case RenderAs.StackedBar100:
                ColumnChart.Update(sender, property, newValue, isAXisChanged);
                //renderedCanvas = BarChart.GetVisualObjectForStackedBar100Chart(width, height, plotDetails, chart, plankDepth, animationEnabled);
                break;

            case RenderAs.Pie:
                //renderedCanvas = PieChart.GetVisualObjectForPieChart(width, height, plotDetails, dataSeriesList4Rendering, chart, animationEnabled);
                break;

            case RenderAs.Doughnut:
                //renderedCanvas = PieChart.GetVisualObjectForDoughnutChart(width, height, plotDetails, dataSeriesList4Rendering, chart, animationEnabled);
                break;

            case RenderAs.StackedArea:
                //renderedCanvas = AreaChart.GetVisualObjectForStackedAreaChart(width, height, plotDetails, dataSeriesList4Rendering, chart, plankDepth, animationEnabled);
                break;

            case RenderAs.StackedArea100:
                //renderedCanvas = AreaChart.GetVisualObjectForStackedArea100Chart(width, height, plotDetails, dataSeriesList4Rendering, chart, plankDepth, animationEnabled);
                break;

            case RenderAs.SectionFunnel:
                //renderedCanvas = FunnelChart.GetVisualObjectForFunnelChart(width, height, plotDetails, dataSeriesList4Rendering, chart, animationEnabled, false);
                break;

            case RenderAs.StreamLineFunnel:
                //renderedCanvas = FunnelChart.GetVisualObjectForFunnelChart(width, height, plotDetails, dataSeriesList4Rendering, chart, animationEnabled, true);
                break;

            case RenderAs.Stock:
                StockChart.Update(sender, property, newValue, isAXisChanged);
                //renderedCanvas = StockChart.GetVisualObjectForStockChart(width, height, plotDetails, dataSeriesList4Rendering, chart, plankDepth, animationEnabled);
                break;

            case RenderAs.CandleStick:
                CandleStick.Update(sender, property, newValue, isAXisChanged);
                //renderedCanvas = CandleStick.GetVisualObjectForCandleStick(width, height, plotDetails, dataSeriesList4Rendering, chart, plankDepth, animationEnabled);
                break;
            }

            chart.ChartArea.AttachScrollEvents();
        }
Пример #3
0
        internal static void UpdateVisualObject(RenderAs chartType, Visifire.Commons.ObservableObject sender, VcProperties property, object newValue, Boolean isAXisChanged)
        {
            Boolean   isDataPoint = sender.GetType().Equals(typeof(DataPoint));
            DataPoint dataPoint   = sender as DataPoint;
            Chart     chart       = (sender as ObservableObject).Chart as Chart;

            switch (chartType)
            {
            case RenderAs.Column:
            case RenderAs.Bar:
                ColumnChart.Update(sender, property, newValue, isAXisChanged);
                break;

            case RenderAs.Line:
            case RenderAs.Spline:
                LineChart.Update(sender, property, newValue, isAXisChanged);

                break;

            case RenderAs.QuickLine:
                QuickLineChart.Update(sender, property, newValue, isAXisChanged);

                break;

            case RenderAs.StepLine:
                StepLineChart.Update(sender, property, newValue, isAXisChanged);

                break;

            case RenderAs.Point:
                PointChart.Update(sender, property, newValue, isAXisChanged);
                break;

            case RenderAs.Bubble:
                BubbleChart.Update(sender, property, newValue, isAXisChanged);
                break;

            case RenderAs.Area:
                AreaChart.Update(sender, property, newValue, isAXisChanged);
                break;

            case RenderAs.StackedColumn:
                ColumnChart.Update(sender, property, newValue, isAXisChanged);
                break;

            case RenderAs.StackedColumn100:
                ColumnChart.Update(sender, property, newValue, isAXisChanged);
                break;

            case RenderAs.StackedBar:
                ColumnChart.Update(sender, property, newValue, isAXisChanged);
                break;

            case RenderAs.StackedBar100:
                ColumnChart.Update(sender, property, newValue, isAXisChanged);
                break;

            case RenderAs.Pie:
                //renderedCanvas = PieChart.GetVisualObjectForPieChart(width, height, plotDetails, dataSeriesList4Rendering, chart, animationEnabled);
                break;

            case RenderAs.Doughnut:
                //renderedCanvas = PieChart.GetVisualObjectForDoughnutChart(width, height, plotDetails, dataSeriesList4Rendering, chart, animationEnabled);
                break;

            case RenderAs.StackedArea:
                List <DataSeries> stackedAreaList = (from ds in chart.Series where ds.RenderAs == RenderAs.StackedArea select ds).ToList();

                if (stackedAreaList.Count > 0)
                {
                    ColumnChart.Update(chart, stackedAreaList[0].RenderAs, stackedAreaList);
                }

                chart.ChartArea.AttachEventsToolTipHref2DataSeries();

                break;

            case RenderAs.StackedArea100:
                List <DataSeries> stackedArea100List = (from ds in chart.Series where ds.RenderAs == RenderAs.StackedArea select ds).ToList();

                if (stackedArea100List.Count > 0)
                {
                    ColumnChart.Update(chart, stackedArea100List[0].RenderAs, stackedArea100List);
                }

                chart.ChartArea.AttachEventsToolTipHref2DataSeries();
                break;

            case RenderAs.SectionFunnel:
            case RenderAs.StreamLineFunnel:
            case RenderAs.Pyramid:
                //renderedCanvas = FunnelChart.GetVisualObjectForFunnelChart(width, height, plotDetails, dataSeriesList4Rendering, chart, animationEnabled, true);
                break;

            case RenderAs.Stock:
                StockChart.Update(sender, property, newValue, isAXisChanged);
                break;

            case RenderAs.CandleStick:
                CandleStick.Update(sender, property, newValue, isAXisChanged);
                break;
            }

            //chart.ChartArea.AttachScrollEvents();
        }