private void RemovePreviousObjects()
 {
     try
     {
         if (chartVu != null)
         {
             ArrayList arrObjects = chartVu.GetChartObjectsArrayList();
             int       iCount     = arrObjects.Count;
             if (arrObjects != null)
             {
                 for (int iCtr = 0; iCtr < iCount; iCtr++)
                 {
                     GraphObj objObject = (GraphObj)arrObjects[0];
                     Type     obj       = objObject.GetType();
                     chartVu.DeleteChartObject(objObject);
                 }
             }
             chartVu.UpdateDraw();
         }
     }
     catch (Exception ex)
     {
     }
 }
        public void BackGroundChanges()
        {
            try
            {
                if (chartVu != null)
                {
                    ArrayList arrObjects = chartVu.GetChartObjectsArrayList();
                    int       iCount     = arrObjects.Count;
                    int       iDel       = 0;
                    if (arrObjects != null)
                    {
                        for (int iCtr = 0; iCtr < iCount; iCtr++)
                        {
                            GraphObj objObject = (GraphObj)arrObjects[iDel];

                            Type obj = objObject.GetType();
                            if (obj.Name == "PolarLinePlot" || obj.Name == "PolarScatterPlot")
                            {
                                iDel++;
                            }
                            else
                            {
                                chartVu.DeleteChartObject(objObject);
                            }
                        }
                    }

                    plotbackground = new Background(pPolarTransform, ChartObj.PLOT_BACKGROUND, ChartBG1, ChartBG2, ChartBGDir);
                    chartVu.AddChartObject(plotbackground);

                    background = new Background(pPolarTransform, ChartObj.GRAPH_BACKGROUND, GraphBG1, GraphBG2, GraphBGDir);
                    chartVu.AddChartObject(background);


                    pPolarAxis = pPolarTransform.GetCompatibleAxes();
                    pPolarAxis.SetColor(_AxisColor);
                    chartVu.AddChartObject(pPolarAxis);

                    pPolarGrid = new PolarGrid(pPolarAxis, PolarGrid.GRID_MAJOR);
                    pPolarGrid.SetColor(_AxisColor);
                    pPolarGrid.LineColor = _AxisColor;
                    chartVu.AddChartObject(pPolarGrid);


                    pPolarAxisLabels = (PolarAxesLabels)pPolarAxis.GetCompatibleAxesLabels();
                    pPolarAxisLabels.SetColor(_AxisColor);
                    chartVu.AddChartObject(pPolarAxisLabels);

                    if (_ChartFooter != null)
                    {
                        ChartTitle footer = new ChartTitle(pPolarTransform, theFont, _ChartFooter);
                        footer.SetColor(_AxisColor);
                        footer.SetTitleType(ChartObj.CHART_FOOTER);
                        footer.SetTitlePosition(ChartObj.CENTER_GRAPH);
                        footer.SetTitleOffset(8);
                        chartVu.AddChartObject(footer);
                    }
                    chartVu.Update();
                }
            }
            catch (Exception ex)
            {
            }
        }