Esempio n. 1
0
        private void GenerateYStripLines(string text1, string text2, string text3, Brush interior)
        {
            ChartStripLine cs = new ChartStripLine();

            cs = new ChartStripLine();
            cs.StartFromAxis = true;
            cs.Start         = 0;
            cs.Offset        = 0;
            cs.Width         = 4;
            cs.Interior      = interior;
            cs.Text          = new FormattedText(text1, CultureInfo.CurrentCulture,
                                                 FlowDirection.LeftToRight, new Typeface("Arial"), 14, Brushes.Crimson);
            this.AssociatedObject.chart1.Areas[0].SecondaryAxis.StripLines.Add(cs);

            cs = new ChartStripLine();
            cs.StartFromAxis = true;
            cs.Start         = 0;
            cs.Offset        = 8;
            cs.Width         = 4;
            cs.Interior      = interior;
            cs.Text          = new FormattedText(text2, CultureInfo.CurrentCulture,
                                                 FlowDirection.LeftToRight, new Typeface("Arial"), 14, Brushes.CornflowerBlue);
            this.AssociatedObject.chart1.Areas[0].SecondaryAxis.StripLines.Add(cs);

            cs = new ChartStripLine();
            cs.StartFromAxis = true;
            cs.Start         = 0;
            cs.Offset        = 16;
            cs.Width         = 4;
            cs.Interior      = interior;
            cs.Text          = new FormattedText(text3, CultureInfo.CurrentCulture,
                                                 FlowDirection.LeftToRight, new Typeface("Arial"), 14, Brushes.Green);
            this.AssociatedObject.chart1.Areas[0].SecondaryAxis.StripLines.Add(cs);
        }
Esempio n. 2
0
        public void DefaultStriplines()
        {
            //Create a new Stripline
            ChartStripLine csX = new ChartStripLine();

            //Set whether this need to started from X Axis
            csX.StartFromAxis = true;
            //Set the offset from where this stripline should be placed
            csX.Offset = 2;
            //Set the width of the stripline
            csX.Width = 20;
            //Set the interior of the stripline
            csX.Interior     = this.Resources["imgBrush"] as ImageBrush;
            csX.IsPixelWidth = true;
            //Set the FormattedText of the Stripline
            csX.Text = new FormattedText("", CultureInfo.CurrentCulture, FlowDirection.LeftToRight, new Typeface("Arial"), 20, Brushes.Black);
            //Add the stripline to the Axis stripline collection
            chart1.Areas[0].PrimaryAxis.StripLines.Add(csX);

            //Create a new Stripline
            ChartStripLine csY = new ChartStripLine();

            //Set whether this need to started from X Axis
            csY.StartFromAxis = false;
            //Set the starting position of the stripline. This need to mentioned when the StartFromAxis is set as false
            csY.Start = 95;
            //Set the width of the stripline
            csY.Width = 2;
            //Set the interior of the stripline
            csY.Interior = App.Current.Resources["StriplineYInterior"] as LinearGradientBrush;
            //Set the FormattedText of the Stripline
            csY.Text = new FormattedText("Historical High - 95'F", CultureInfo.CurrentCulture, FlowDirection.LeftToRight, new Typeface("Arial"), 10, Brushes.Black);
            //Add the stripline to the Axis stripline collection
            chart1.Areas[0].SecondaryAxis.StripLines.Add(csY);
        }
Esempio n. 3
0
        // GET: RSI
        public ActionResult RSI()
        {
            ViewBag.crosshairTooltip = new { enable = true };
            ViewBag.majorGridLines   = new { width = 0.00001 };
            ViewBag.lineStyle        = new { width = 0.00001 };
            ViewBag.majorTickLines   = new { width = 0.00001 };
            ViewBag.upperLine        = new { color = "#e74c3d" };
            ViewBag.lowerLine        = new { color = "#2ecd71" };
            ViewBag.chartBorder      = new ChartBorder {
                Color = "transparent"
            };
            List <ChartStripLine> striplines = new List <ChartStripLine>();
            ChartStripLine        one        = new ChartStripLine();

            one.Start   = "0";
            one.End     = "120";
            one.Text    = "";
            one.Color   = "black";
            one.Visible = true;
            one.Opacity = 0.03;
            one.ZIndex  = ZIndex.Behind;
            striplines.Add(one);
            ViewBag.xAxisStripLine = striplines;
            return(View());
        }
Esempio n. 4
0
        private void InitializeControlSettings()
        {
            this.chartControl1.ChartArea.PrimaryXAxis.HidePartialLabels = true;
            this.chartControl1.BorderAppearance.SkinStyle   = Syncfusion.Windows.Forms.Chart.ChartBorderSkinStyle.None;
            this.chartControl1.PrimaryYAxis.DrawGrid        = false;
            this.chartControl1.TextRenderingHint            = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
            this.chartControl1.Series[0].Style.Interior     = new BrushInfo(Color.FromArgb(0xFF, 0x1B, 0xA1, 0xE2));
            this.chartControl1.Series[0].Style.Border.Color = Color.FromArgb(0xFF, 0x1B, 0xA1, 0xE2);

            ChartStripLine thermoStripLine = new ChartStripLine();
            //thermoStripLine.Enabled = true;
            //thermoStripLine.Vertical = true;
            //thermoStripLine.StartAtAxisPosition = true;
            //thermoStripLine.Start = 0;
            //thermoStripLine.Text = "Transmission Oil Temperature ";
            Assembly asem = this.GetType().Assembly;
            Stream   str  = asem.GetManifestResourceStream("TickMarksDemo_2005.Thermometer.png");
            Image    img  = Image.FromStream(str);

            thermoStripLine.BackImage = img;
            thermoStripLine.Font      = new System.Drawing.Font("Segeo UI", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(161)));
            thermoStripLine.Period    = 9;
            thermoStripLine.Width     = .5;
            this.chartControl1.PrimaryXAxis.StripLines.Add(thermoStripLine);
            this.chartControl1.ShowLegend = false;


            ChartCustomPoint cp1 = new ChartCustomPoint();

            cp1.Text           = "LOW HEAT : LONG MILEAGE";
            cp1.CustomType     = ChartCustomPointType.ChartCoordinates;
            cp1.Font.Facename  = "Segeo UI";
            cp1.Font.FontStyle = FontStyle.Bold;
            cp1.Font.Size      = 7;
            cp1.XValue         = 158;
            cp1.YValue         = 4;
            this.chartControl1.CustomPoints.Add(cp1);

            ChartCustomPoint cp2 = new ChartCustomPoint();

            cp2.Text           = "HIGH HEAT : SHORT MILEAGE";
            cp2.Font.Facename  = "Segeo UI";
            cp2.Font.FontStyle = FontStyle.Bold;
            cp2.Font.Size      = 7;
            cp2.CustomType     = ChartCustomPointType.ChartCoordinates;
            cp2.XValue         = 335;
            cp2.YValue         = 4;
            this.chartControl1.CustomPoints.Add(cp2);

            this.chartControl1.Refresh();
        }
Esempio n. 5
0
        private void GenerateXStripLines(string text1, string text2, string text3, string text4, Brush interior)
        {
            ChartStripLine cs = new ChartStripLine();

            cs.StartFromAxis = true;
            cs.Start         = 0;
            cs.Offset        = 0;
            cs.Width         = 2;
            cs.Interior      = interior;
            cs.Text          = new FormattedText(text1, CultureInfo.CurrentCulture,
                                                 FlowDirection.LeftToRight, new Typeface("Arial"), 14, Brushes.Green);
            cs.TextRotationAngle = 270;
            cs.Interior          = interior;
            this.AssociatedObject.chart1.Areas[1].PrimaryAxis.StripLines.Add(cs);

            cs = new ChartStripLine();
            cs.StartFromAxis = true;
            cs.Start         = 0;
            cs.Offset        = 3;
            cs.Width         = 2;
            cs.Interior      = interior;
            cs.Text          = new FormattedText(text2, CultureInfo.CurrentCulture,
                                                 FlowDirection.LeftToRight, new Typeface("Arial"), 14, Brushes.Green);
            cs.TextRotationAngle = 270;
            this.AssociatedObject.chart1.Areas[1].PrimaryAxis.StripLines.Add(cs);


            cs = new ChartStripLine();
            cs.StartFromAxis = true;
            cs.Start         = 0;
            cs.Offset        = 6;
            cs.Width         = 2;
            cs.Interior      = interior;
            cs.Text          = new FormattedText(text3, CultureInfo.CurrentCulture,
                                                 FlowDirection.LeftToRight, new Typeface("Arial"), 14, Brushes.Green);
            cs.TextRotationAngle = 270;
            this.AssociatedObject.chart1.Areas[1].PrimaryAxis.StripLines.Add(cs);

            cs = new ChartStripLine();
            cs.StartFromAxis     = true;
            cs.Start             = 0;
            cs.Offset            = 9;
            cs.Width             = 2;
            cs.Interior          = interior;
            cs.TextRotationAngle = 270;
            cs.Text = new FormattedText(text4, CultureInfo.CurrentCulture,
                                        FlowDirection.LeftToRight, new Typeface("Arial"), 14, Brushes.Green);
            this.AssociatedObject.chart1.Areas[1].PrimaryAxis.StripLines.Add(cs);
        }
Esempio n. 6
0
        private void checkBox1_Checked(object sender, RoutedEventArgs e)
        {
            if (checkBox1.IsChecked == true)
            {
                ChartStripLine sp = new ChartStripLine();
                chart1.Areas[0].SecondaryAxis.StripLines.Clear();
                chart1.Areas[0].PrimaryAxis.StripLines.Clear();

                List <ProductionInfo> source = chart1.Areas[0].Series[0].DataSource as List <ProductionInfo>;
                //chart1.Areas[0].Series[0].Type = ChartTypes.Column;

                foreach (ProductionInfo item in source)
                {
                    // add strip lines to YAxis
                    sp                   = new ChartStripLine();
                    sp.IsSegmented       = true;
                    sp.Start             = item.Production;
                    sp.Width             = 4;
                    sp.Interior          = App.Current.Resources["StriplineYInterior"] as LinearGradientBrush;
                    sp.StartFromAxis     = false;
                    sp.SegmentStartValue = item.Day.ToOADate() - 1;
                    sp.SegmentEndValue   = item.Day.ToOADate();

                    sp.Text = new FormattedText(item.Production.ToString(), CultureInfo.CurrentCulture, FlowDirection.LeftToRight, new Typeface("Arial"), 10, Brushes.Black);


                    chart1.Areas[0].SecondaryAxis.StripLines.Add(sp);


                    //add strip lines to XAxis
                    sp                   = new ChartStripLine();
                    sp.IsSegmented       = true;
                    sp.Start             = item.Day.ToOADate();
                    sp.Width             = 4;
                    sp.Interior          = App.Current.Resources["StriplineXInterior"] as LinearGradientBrush;
                    sp.StartFromAxis     = false;
                    sp.SegmentStartValue = item.Production - 15;
                    sp.SegmentEndValue   = item.Production;
                    if (source.IndexOf(item) != 0)
                    {
                        sp.Text = new FormattedText(item.Day.DayOfWeek.ToString(), CultureInfo.CurrentCulture, FlowDirection.LeftToRight, new Typeface("Arial"), 10, Brushes.Black);
                    }

                    chart1.Areas[0].PrimaryAxis.StripLines.Add(sp);
                }
            }
        }
Esempio n. 7
0
        /// <summary>
        /// Contrcutor for window1.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public Window1()
        {
            InitializeComponent();
            this.SeriesDataSource();

            ChartStripLine cs = new ChartStripLine();

            cs.StartFromAxis = true;
            cs.Offset        = (int)this.cmboffset.SelectedItem;
            cs.Width         = (int)this.cmbStripWidth.SelectedItem;
            cs.RepeatEvery   = (int)this.cmbstripRPFreq.SelectedItem;
            cs.Interior      = conv.ConvertFromString(this.xStripInteriorOptions.SelectedItem.ToString().Trim()) as SolidColorBrush;
            cs.Text          = new FormattedText(txtXStriplinetext.Text, CultureInfo.CurrentCulture,
                                                 FlowDirection.LeftToRight, new Typeface("Arial"), 20, Brushes.Black);
            cs.TextRotationAngle = (int)txtRotationAngle.Value;
            chart1.Areas[0].PrimaryAxis.StripLines.Add(cs);
        }
Esempio n. 8
0
        /// <summary>
        /// Draws a strip line that acts as a separator between two chart areas.
        /// </summary>
        private void CreateStripLine()
        {
            ChartStripLine sLine = new ChartStripLine();

            sLine.Enabled             = true;
            sLine.StartAtAxisPosition = false;
            sLine.Vertical            = false;
            sLine.Start         = 112;
            sLine.Width         = 4;
            sLine.End           = sLine.Start + sLine.Width + 1;
            sLine.Font          = new Font("Segoe UI", 8f);
            sLine.Text          = " ";
            sLine.TextAlignment = ContentAlignment.MiddleCenter;
            sLine.TextColor     = Color.Maroon;
            sLine.Interior      = new BrushInfo(GradientStyle.Vertical, Color.DarkOliveGreen, Color.Olive);
            chartControl1.PrimaryYAxis.StripLines.Add(sLine);
        }
Esempio n. 9
0
        protected void SetStripLine(double start, double end)
        {
            //Chart Strip Lines
            if (this.chartControl1.PrimaryXAxis.StripLines.Count >= 0)
            {
                this.chartControl1.PrimaryXAxis.StripLines.Clear();
            }
            ChartStripLine stripLine = new ChartStripLine();

            stripLine.Enabled  = true;
            stripLine.Vertical = false;
            stripLine.Start    = start;
            stripLine.End      = end;
            stripLine.Text     = " ";
            stripLine.Width    = 250;
            stripLine.Period   = 1;
            stripLine.Interior = new BrushInfo(GradientStyle.Horizontal, stripLineColor);
            this.chartControl1.PrimaryXAxis.StripLines.Add(stripLine);
        }
Esempio n. 10
0
        /// <summary>
        /// Event for setting secondary stripLine properties like offset,Width,Interior,RepeatEvery.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void butaddYstripline_Click(object sender, RoutedEventArgs e)
        {
            // Add a stripline along the y axis
            ChartStripLine cs = new ChartStripLine();

            cs.StartFromAxis = false;
            cs.Start         = (int)this.cmbstripPosition.SelectedItem;
            cs.Width         = (int)this.cmbstripLength.SelectedItem;
            cs.RepeatEvery   = (int)this.cmbstripYRPFreq.SelectedItem;
            cs.RepeatUntil   = 100;
            cs.Interior      = conv.ConvertFromString(this.yStripInteriorOptions.SelectedItem.ToString().Trim()) as SolidColorBrush;
            cs.Text          = new FormattedText(txtStriplineYtext.Text, CultureInfo.CurrentCulture,
                                                 FlowDirection.LeftToRight, new Typeface("Arial"), 20, Brushes.Black);
            cs.TextRotationAngle = (int)this.txtRotationAngle1.Value;
            // First clearing the existing strip lines (but this is not mandatory)
            if (chart1.Areas[0].SecondaryAxis.StripLines.Count > 1)
            {
                chart1.Areas[0].SecondaryAxis.StripLines.RemoveAt(1);
            }
            chart1.Areas[0].SecondaryAxis.StripLines.Add(cs);
            return;
        }
        // GET: ATR
        public ActionResult ATR()
        {
            ViewBag.Line = new
            {
                width = 0.0001
            };
            ViewBag.chartBorder = new ChartBorder {
                Color = "transparent"
            };
            List <ChartStripLine> striplines = new List <ChartStripLine>();
            ChartStripLine        one        = new ChartStripLine();

            one.Start   = "0";
            one.End     = "14";
            one.Text    = "";
            one.Color   = "#6063ff";
            one.Visible = true;
            one.Opacity = 0.1;
            one.ZIndex  = ZIndex.Behind;
            striplines.Add(one);
            ViewBag.xAxisStripLine = striplines;
            return(View());
        }
Esempio n. 12
0
        /// <summary>
        /// Event for setting primaryaxis stripLine properties like offset,Width,Interior,RepeatEvery.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        private void butaddstripline_Click(object sender, RoutedEventArgs e)
        {
            // Add a stripline along the x axis
            //if (chart1.Areas[0].PrimaryAxis.StripLines.Count == 0)
            //    return;
            ChartStripLine cs = new ChartStripLine();//chart1.Areas[0].PrimaryAxis.StripLines[0];

            cs.StartFromAxis = true;
            cs.Offset        = (int)this.cmboffset.SelectedItem;
            cs.Width         = (int)this.cmbStripWidth.SelectedItem;
            cs.RepeatEvery   = (int)this.cmbstripRPFreq.SelectedItem;
            cs.Interior      = conv.ConvertFromString(this.xStripInteriorOptions.SelectedItem.ToString().Trim()) as SolidColorBrush;
            cs.Text          = new FormattedText(txtXStriplinetext.Text, CultureInfo.CurrentCulture,
                                                 FlowDirection.LeftToRight, new Typeface("Arial"), 20, Brushes.Black);
            cs.TextRotationAngle = (int)txtRotationAngle.Value;
            //SetXAxisStripLine();

            //// First clearing the existing strip lines (but this is not mandatory)
            //if (chart1.Areas[0].PrimaryAxis.StripLines.Count > 1)
            //    chart1.Areas[0].PrimaryAxis.StripLines.RemoveAt(1);

            chart1.Areas[0].PrimaryAxis.StripLines.Add(cs);
            return;
        }
Esempio n. 13
0
        // GET: Hilo
        public ActionResult Candle()
        {
            List <ChartStripLine> yAxisStripline = new List <ChartStripLine>();

            ChartStripLine ystripline1 = new ChartStripLine();

            ystripline1.End           = "1300000000";
            ystripline1.Text          = "";
            ystripline1.StartFromAxis = true;
            ystripline1.Color         = "black";
            ystripline1.Opacity       = 0.03;
            ystripline1.ZIndex        = ZIndex.Behind;
            ystripline1.Visible       = true;
            yAxisStripline.Add(ystripline1);
            ViewBag.yAxisStripLine = yAxisStripline;

            ViewBag.chartBorder = new ChartBorder {
                Color = "transparent"
            };
            ViewBag.crosshairTooltip = new { enable = true };
            ViewBag.majorGridLines   = new { width = 0.00001 };
            ViewBag.lineStyle        = new { width = 0.00001 };
            ViewBag.animation        = new ChartAnimation {
                Enable = true
            };

            List <RangeNavigatorPeriod> periods = new List <RangeNavigatorPeriod>();
            RangeNavigatorPeriod        one     = new RangeNavigatorPeriod();

            one.Text         = "1M";
            one.IntervalType = RangeIntervalType.Months;
            one.Interval     = 1;
            RangeNavigatorPeriod two = new RangeNavigatorPeriod();

            two.Text         = "3M";
            two.IntervalType = RangeIntervalType.Months;
            two.Interval     = 2;
            RangeNavigatorPeriod three = new RangeNavigatorPeriod();

            three.Text         = "2Q";
            three.IntervalType = RangeIntervalType.Quarter;
            three.Interval     = 2;
            RangeNavigatorPeriod four = new RangeNavigatorPeriod();

            four.Text     = "1Y";
            four.Interval = 1;
            RangeNavigatorPeriod five = new RangeNavigatorPeriod();

            five.Text     = "2Y";
            five.Interval = 2;
            five.Selected = true;
            RangeNavigatorPeriod six = new RangeNavigatorPeriod();

            six.Text = "YTD";
            RangeNavigatorPeriod seven = new RangeNavigatorPeriod();

            seven.Text = "ALL";
            periods.Add(one);
            periods.Add(two);
            periods.Add(three);
            periods.Add(four);
            periods.Add(five);
            periods.Add(six);
            periods.Add(seven);
            ViewBag.periods = periods;
            return(View());
        }
Esempio n. 14
0
        private void OnChartTypeSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ComboBox comboBox = sender as ComboBox;

            if (Basic_Chart5 == null)
            {
                return;
            }

            if (comboBox.SelectedIndex == 0 && viewModelBar != null)
            {
                Basic_Chart5.SetValue(Grid.RowSpanProperty, 2);
                Basic_Chart5.Axes.Clear();
                Basic_Chart5.Height = 515;
                Basic_Chart5.Header = "Car Speed Comparison";
                Basic_Chart5.AreaBorderThickness = new Thickness(0, 0, 0, 0);
                BarSeries    series1   = new BarSeries();
                DataTemplate template1 = MainGrid3.Resources["newBarTemplate"] as DataTemplate;

                CategoryAxis axis1 = new CategoryAxis()
                {
                    ShowGridLines = false
                };

                NumericalAxis axis2 = new NumericalAxis()
                {
                    Header = "Acceleration rate",
                    EdgeLabelsDrawingMode = EdgeLabelsDrawingMode.Shift,
                    LabelFormat           = "0Kmph",
                    Minimum       = "0",
                    Maximum       = "300",
                    Interval      = "75",
                    ShowGridLines = false
                };

                series1.XBindingPath   = "Month";
                series1.YBindingPath   = "Value1";
                series1.CustomTemplate = template1;
                series1.SegmentSpacing = 0.9;
                series1.ItemsSource    = viewModelBar;
                series1.XAxis          = axis1;
                series1.YAxis          = axis2;
                Basic_Chart5.Series.Clear();
                Basic_Chart5.Series.Add(series1);
            }

            else if (comboBox.SelectedIndex == 1 && viewModelScatter != null)
            {
                Basic_Chart5.SetValue(Grid.RowSpanProperty, 2);
                Basic_Chart5.Axes.Clear();
                Basic_Chart5.Header = "Global Stock Trend Comparison (2013 - 2014)";
                Basic_Chart5.AreaBorderThickness = new Thickness(0, 0.5, 0.5, 0);
                Basic_Chart5.Height          = 515;
                Basic_Chart5.AreaBorderBrush = new SolidColorBrush(Color.FromArgb(0xFF, 0xD1, 0xD3, 0xD4));
                DataTemplate       template1      = MainGrid3.Resources["scattertemplate"] as DataTemplate;
                DataTemplate       template2      = MainGrid3.Resources["scatterAdornmentTemplate"] as DataTemplate;
                ChartAdornmentInfo adornmentInfo1 = new ChartAdornmentInfo();
                DateTimeAxis       axis1          = new DateTimeAxis()
                {
                    PlotOffset    = 30,
                    Interval      = 1,
                    IntervalType  = DateTimeIntervalType.Months,
                    LabelFormat   = "MMM",
                    Header        = "Year 2014",
                    ShowGridLines = false
                };

                NumericalAxis axis2 = new NumericalAxis()
                {
                    Minimum     = 10,
                    Maximum     = 80,
                    Interval    = 10,
                    Header      = "Stock Price",
                    LabelFormat = "$0",
                };

                ScatterSeries series = new ScatterSeries();
                adornmentInfo1.ShowLabel           = true;
                adornmentInfo1.SegmentLabelContent = LabelContent.LabelContentPath;
                adornmentInfo1.LabelTemplate       = template2;
                series.XBindingPath   = "Year";
                series.YBindingPath   = "Count";
                series.CustomTemplate = template1;
                series.YAxis          = axis2;
                series.XAxis          = axis1;
                series.ItemsSource    = viewModelScatter;
                series.ScatterWidth   = 64;
                series.ScatterHeight  = 64;
                series.AdornmentsInfo = adornmentInfo1;
                Basic_Chart5.Series.Clear();
                Basic_Chart5.Series.Add(series);
            }
            else if (comboBox.SelectedIndex == 2 && viewModelSpline != null)
            {
                Basic_Chart5.SetValue(Grid.RowSpanProperty, 2);
                Basic_Chart5.Axes.Clear();
                Basic_Chart5.Height = 515;
                Basic_Chart5.Header = "Climate Graph";

                Basic_Chart5.AreaBorderThickness = new Thickness(1, 1, 1, 1);
                Basic_Chart5.AreaBorderBrush     = new SolidColorBrush(Color.FromArgb(0xFF, 0xD1, 0xD3, 0xD4));
                Basic_Chart5.AreaBorderThickness = new Thickness(0, 0.5, 0.5, 0);
                SplineSeries series    = new SplineSeries();
                DataTemplate template1 = MainGrid3.Resources["splinetemplate"] as DataTemplate;
                DateTimeAxis axis1     = new DateTimeAxis()
                {
                    PlotOffset    = 20,
                    Interval      = 1,
                    IntervalType  = DateTimeIntervalType.Months,
                    LabelFormat   = "MMM",
                    Header        = "Year 2014",
                    ShowGridLines = false,
                };

                NumericalAxis axis2 = new NumericalAxis()
                {
                    Minimum  = -10,
                    Maximum  = 30,
                    Interval = 5,
                    Header   = "Temperature(in Celsius)",
                };

                ChartStripLine stripline = new ChartStripLine()
                {
                    Start      = -0.2,
                    Width      = 0.2,
                    Background = new SolidColorBrush(Colors.Red)
                };
                axis2.StripLines.Add(stripline);

                series.XBindingPath   = "Month";
                series.YBindingPath   = "Value2";
                series.YAxis          = axis2;
                series.XAxis          = axis1;
                series.ItemsSource    = viewModelSpline;
                series.CustomTemplate = template1;
                Basic_Chart5.Series.Clear();
                Basic_Chart5.Series.Add(series);
            }
        }
        // GET: StripLine
        public ActionResult StripLine()
        {
            List <StripLineChartData> chartData = new List <StripLineChartData>
            {
                new StripLineChartData {
                    x = "Sun", y = 28
                },
                new StripLineChartData {
                    x = "Mon", y = 27
                },
                new StripLineChartData {
                    x = "Tue", y = 33
                },
                new StripLineChartData {
                    x = "Wed", y = 36
                },
                new StripLineChartData {
                    x = "Thu", y = 28
                },
                new StripLineChartData {
                    x = "Fri", y = 30
                },
                new StripLineChartData {
                    x = "Sat", y = 31
                }
            };

            ViewBag.dataSource = chartData;
            ViewBag.marker     = new ChartMarkerSettings
            {
                Visible = true,
                Width   = 10,
                Height  = 10,
                Border  = new ChartBorder {
                    Width = 2, Color = "#ffffff"
                },
                Fill = "#666666"
            };
            ViewBag.majorGridLines = new { width = 0.00001 };
            ViewBag.lineStyle      = new { color = "#808080" };
            ViewBag.data           = new string[] { "Vertical", "Horizontal" };
            List <ChartStripLine> xAxisStripline = new List <ChartStripLine>();

            ChartStripLine xstripline1 = new ChartStripLine();

            xstripline1.Start     = "-1";
            xstripline1.End       = "1.5";
            xstripline1.Text      = "Winter";
            xstripline1.Color     = "url(#winter)";
            xstripline1.TextStyle = new { size = "18px", color = "#ffffff", fontWeight = "600" };
            xstripline1.Border    = new ChartBorder {
                Width = 0.2
            };
            xstripline1.Rotation = -90;
            xstripline1.Visible  = true;

            ChartStripLine xstripline2 = new ChartStripLine();

            xstripline2.Start     = "1.5";
            xstripline2.End       = "3.5";
            xstripline2.Text      = "Summer";
            xstripline2.Color     = "url(#summer)";
            xstripline2.TextStyle = new { size = "18px", color = "#ffffff", fontWeight = "600" };
            xstripline2.Border    = new ChartBorder {
                Width = 0.2
            };
            xstripline2.Rotation = -90;
            xstripline2.Visible  = true;

            ChartStripLine xstripline3 = new ChartStripLine();

            xstripline3.Start     = "3.5";
            xstripline3.End       = "4.5";
            xstripline3.Text      = "Spring";
            xstripline3.Color     = "url(#spring)";
            xstripline3.TextStyle = new { size = "18px", color = "#ffffff", fontWeight = "600" };
            xstripline3.Border    = new ChartBorder {
                Width = 0.2
            };
            xstripline3.Rotation = -90;
            xstripline3.Visible  = true;

            ChartStripLine xstripline4 = new ChartStripLine();

            xstripline4.Start     = "4.5";
            xstripline4.End       = "5.5";
            xstripline4.Text      = "Autumn";
            xstripline4.Color     = "url(#autumn)";
            xstripline4.TextStyle = new { size = "18px", color = "#ffffff", fontWeight = "600" };
            xstripline4.Border    = new ChartBorder {
                Width = 0.2
            };
            xstripline4.Rotation = -90;
            xstripline4.Visible  = true;

            ChartStripLine xstripline5 = new ChartStripLine();

            xstripline5.Start     = "5.5";
            xstripline5.End       = "7";
            xstripline5.Text      = "Winter";
            xstripline5.Color     = "url(#winter)";
            xstripline5.TextStyle = new { size = "18px", color = "#ffffff", fontWeight = "600" };
            xstripline5.Border    = new ChartBorder {
                Width = 0.2
            };
            xstripline5.Rotation = -90;
            xstripline5.Visible  = true;

            xAxisStripline.Add(xstripline1);
            xAxisStripline.Add(xstripline2);
            xAxisStripline.Add(xstripline3);
            xAxisStripline.Add(xstripline4);
            xAxisStripline.Add(xstripline5);
            ViewBag.xAxisStripLine = xAxisStripline;

            List <ChartStripLine> yAxisStripline = new List <ChartStripLine>();
            ChartStripLine        ystripline1    = new ChartStripLine();

            ystripline1.Start     = "30";
            ystripline1.End       = "40";
            ystripline1.Text      = "High Temperature";
            ystripline1.Color     = "#ff512f";
            ystripline1.TextStyle = new { size = "18px", color = "#ffffff", fontWeight = "600" };
            ystripline1.Border    = new ChartBorder {
                Width = 0.2
            };
            ystripline1.Visible = false;

            ChartStripLine ystripline2 = new ChartStripLine();

            ystripline2.Start     = "20";
            ystripline2.End       = "30";
            ystripline2.Text      = "Average Temperature";
            ystripline2.Color     = "#fc902a";
            ystripline2.TextStyle = new { size = "18px", color = "#ffffff", fontWeight = "600" };
            ystripline2.Border    = new ChartBorder {
                Width = 0.2
            };
            ystripline2.Visible = false;

            ChartStripLine ystripline3 = new ChartStripLine();

            ystripline3.Start     = "10";
            ystripline3.End       = "20";
            ystripline3.Text      = "Low Temperature";
            ystripline3.Color     = "#f9d423";
            ystripline3.TextStyle = new { size = "18px", color = "#ffffff", fontWeight = "600" };
            ystripline3.Border    = new ChartBorder {
                Width = 0.2
            };
            ystripline3.Visible = false;

            yAxisStripline.Add(ystripline1);
            yAxisStripline.Add(ystripline2);
            yAxisStripline.Add(ystripline3);
            ViewBag.yAxisStripLine = yAxisStripline;
            return(View());
        }
Esempio n. 16
0
        protected void InitializeChartData()
        {
            ChartSeries Completion = new ChartSeries("Completion", ChartSeriesType.Gantt);

            DateTime dt = new DateTime(2009, 1, 1);

            Completion.Points.Add(0, dt, dt.AddDays(2));
            Completion.Points.Add(1, dt.AddDays(1), dt.AddDays(2));
            Completion.Points.Add(2, dt.AddDays(3), dt.AddDays(5));
            Completion.Points.Add(3, dt.AddDays(6), dt.AddDays(9));
            Completion.Points.Add(4, dt.AddDays(10), dt.AddDays(13));
            Completion.Points.Add(5, dt.AddDays(15), dt.AddDays(18));

            Completion.Style.PointWidth = 0.5f;

            this.chartControl1.Series.Add(Completion);
            Completion.PointsToolTipFormat = "{1}{2}";

            ChartSeries Task = new ChartSeries("Task", ChartSeriesType.Gantt);

            Task.Points.Add(0, dt, dt.AddDays(2));
            Task.Points.Add(1, dt.AddDays(1), dt.AddDays(3));
            Task.Points.Add(2, dt.AddDays(3), dt.AddDays(6));
            Task.Points.Add(3, dt.AddDays(6), dt.AddDays(10));
            Task.Points.Add(4, dt.AddDays(10), dt.AddDays(15));
            Task.Points.Add(5, dt.AddDays(15), dt.AddDays(20));

            // Make a note of the last day:
            DateTime lastDay = DateTime.FromOADate(Task.Points[Task.Points.Count - 1].YValues[1]);

            Task.Style.PointWidth = 0.75f;
            this.chartControl1.Series.Add(Task);
            Task.PointsToolTipFormat = "{1}{2}";

            this.chartControl1.ShowToolTips = true;
            this.chartControl1.CalcRegions  = true;


            this.chartControl1.PrimaryXAxis.RangeType     = ChartAxisRangeType.Set;
            this.chartControl1.PrimaryXAxis.DateTimeRange = new ChartDateTimeRange(dt, lastDay.AddDays(2), 1, ChartDateTimeIntervalType.Days);

            // Displays custom into on Points
            for (int i = 0; i < this.chartControl1.Series[0].Points.Count; i++)
            {
                if (this.chartControl1.Series[1].Points[i].YValues[0] != this.chartControl1.Series[1].Points[i].YValues[1])
                {
                    ChartCustomPoint ccp = new ChartCustomPoint();

                    ChartPoint pt = this.chartControl1.Series[1].Points[i];
                    ccp.XValue        = pt.X;
                    ccp.YValue        = pt.YValues[0] + 1;
                    ccp.CustomType    = ChartCustomPointType.ChartCoordinates;
                    ccp.Text          = String.Format("{0} days", pt.YValues[1] - pt.YValues[0]);
                    ccp.Color         = Color.White;
                    ccp.Font.Facename = "Segoe UI";
                    this.chartControl1.CustomPoints.Add(ccp);
                }
            }

            // To indicate weekends
            Color[] stripLineColor = new Color[] { Color.LightGray, Color.WhiteSmoke, Color.LightGray };

            //Chart Strip Lines
            ChartStripLine stripLine1 = new ChartStripLine();

            stripLine1.Enabled   = true;
            stripLine1.Vertical  = false;
            stripLine1.StartDate = dt.AddDays(2); //// We know that Jan 3rd is a Saturday.
            stripLine1.EndDate   = lastDay;
            stripLine1.Width     = 2;

            // Repetition frequency: every 7 days
            stripLine1.PeriodDate = new TimeSpan(7, 0, 0, 0);
            stripLine1.Text       = string.Empty;
            stripLine1.Interior   = new BrushInfo(GradientStyle.ForwardDiagonal, stripLineColor);
            this.chartControl1.PrimaryXAxis.StripLines.Add(stripLine1);

            this.chartControl1.Series[0].PrepareStyle += new ChartPrepareStyleInfoHandler(Form1_PrepareStyle);
            this.chartControl1.Series[1].PrepareStyle += new ChartPrepareStyleInfoHandler(Form1_PrepareStyle);
        }
        public IActionResult Stripline()
        {
            List <SymbolsData> chartData = new List <SymbolsData>
            {
                new SymbolsData {
                    x = "Sun", y = 25
                },
                new SymbolsData {
                    x = "Mon", y = 27
                },
                new SymbolsData {
                    x = "Tue", y = 33
                },
                new SymbolsData {
                    x = "Wed", y = 36
                },
                new SymbolsData {
                    x = "Thu", y = 26
                },
                new SymbolsData {
                    x = "Fri", y = 37.5
                },
                new SymbolsData {
                    x = "Sat", y = 23
                }
            };

            ViewBag.dataSource = chartData;

            List <ChartStripLine> xaxisstriplines = new List <ChartStripLine>();
            ChartStripLine        strip1          = new ChartStripLine();

            strip1.Start     = "-1";
            strip1.End       = "1.5";
            strip1.Text      = "Winter";
            strip1.Color     = "url(#winter)";
            strip1.Rotation  = -90;
            strip1.Visible   = true;
            strip1.TextStyle = new ChartFont {
                Size = "18px", Color = "#ffffff", FontWeight = "600"
            };
            xaxisstriplines.Add(strip1);


            ChartStripLine strip2 = new ChartStripLine();

            strip2.Start     = "1.5";
            strip2.End       = "3";
            strip2.Text      = "Summer";
            strip2.Color     = "url(#summer)";
            strip2.Rotation  = -90;
            strip2.Visible   = true;
            strip2.TextStyle = new ChartFont {
                Size = "18px", Color = "#ffffff", FontWeight = "600"
            };
            xaxisstriplines.Add(strip2);

            ChartStripLine strip3 = new ChartStripLine();

            strip3.Start     = "3";
            strip3.End       = "4.5";
            strip3.Text      = "Spring";
            strip3.Color     = "url(#spring)";
            strip3.Rotation  = -90;
            strip3.Visible   = true;
            strip3.TextStyle = new ChartFont {
                Size = "18px", Color = "#ffffff", FontWeight = "600"
            };
            xaxisstriplines.Add(strip3);

            ChartStripLine strip4 = new ChartStripLine();

            strip4.Start     = "4.5";
            strip4.End       = "5.5";
            strip4.Text      = "Autumn";
            strip4.Color     = "url(#autumn)";
            strip4.Rotation  = -90;
            strip4.Visible   = true;
            strip4.TextStyle = new ChartFont {
                Size = "18px", Color = "#ffffff", FontWeight = "600"
            };
            xaxisstriplines.Add(strip4);

            ChartStripLine strip5 = new ChartStripLine();

            strip5.Start     = "5.5";
            strip5.End       = "6.5";
            strip5.Text      = "Winter";
            strip5.Color     = "url(#winter)";
            strip5.Rotation  = -90;
            strip5.Visible   = true;
            strip5.TextStyle = new ChartFont {
                Size = "18px", Color = "#ffffff", FontWeight = "600"
            };
            xaxisstriplines.Add(strip5);

            ChartStripLine strip6 = new ChartStripLine();

            strip6.StartFromAxis = true;
            strip6.Size          = 2;
            strip6.IsSegmented   = true;
            strip6.SegmentStart  = "22.5";
            strip6.SegmentEnd    = "27.5";
            strip6.Text          = "Average Temperature";
            strip6.Color         = "#fc902a";
            strip6.Visible       = false;
            strip6.TextStyle     = new ChartFont {
                Size = "18px", Color = "#ffffff", FontWeight = "600"
            };
            xaxisstriplines.Add(strip6);


            ChartStripLine strip7 = new ChartStripLine();

            strip7.Start        = "3.5";
            strip7.Size         = 3;
            strip7.IsSegmented  = true;
            strip7.SegmentStart = "22.5";
            strip7.SegmentEnd   = "27.5";
            strip7.Text         = "Average Temperature";
            strip7.Color        = "#fc902a";
            strip7.Visible      = false;
            strip7.TextStyle    = new ChartFont {
                Size = "18px", Color = "#ffffff", FontWeight = "600"
            };
            xaxisstriplines.Add(strip7);

            ChartStripLine strip8 = new ChartStripLine();

            strip8.Start        = "1.5";
            strip8.Size         = 2;
            strip8.IsSegmented  = true;
            strip8.SegmentStart = "32.5";
            strip8.SegmentEnd   = "37.5";
            strip8.Text         = "High Temperature";
            strip8.Color        = "#fc902a";
            strip8.Visible      = false;
            strip8.TextStyle    = new ChartFont {
                Size = "18px", Color = "#ffffff", FontWeight = "600"
            };
            xaxisstriplines.Add(strip8);

            List <ChartStripLine> yaxisstriplines = new List <ChartStripLine>();
            ChartStripLine        stripy1         = new ChartStripLine();

            stripy1.Start     = "30";
            stripy1.End       = "40";
            stripy1.Text      = "High Temperature";
            stripy1.Color     = "#ff512f";
            stripy1.Visible   = false;
            stripy1.TextStyle = new ChartFont {
                Size = "18px", Color = "#ffffff", FontWeight = "600"
            };
            yaxisstriplines.Add(stripy1);

            ChartStripLine stripy2 = new ChartStripLine();

            stripy2.Start     = "20";
            stripy2.End       = "30";
            stripy2.Text      = "Average Temperature";
            stripy2.Color     = "#fc902a";
            stripy2.Visible   = false;
            stripy2.TextStyle = new ChartFont {
                Size = "18px", Color = "#ffffff", FontWeight = "600"
            };
            yaxisstriplines.Add(stripy2);

            ChartStripLine stripy3 = new ChartStripLine();

            stripy3.Start     = "10";
            stripy3.End       = "20";
            stripy3.Text      = "Low Temperature";
            stripy3.Color     = "#f9d423";
            stripy3.Visible   = false;
            stripy3.TextStyle = new ChartFont {
                Size = "18px", Color = "#ffffff", FontWeight = "600"
            };
            yaxisstriplines.Add(stripy3);

            ViewBag.xAxis = xaxisstriplines;
            ViewBag.yAxis = yaxisstriplines;
            ViewBag.mode  = new String[] { "Vertical", "Horizontal", "Segment" };
            return(View());
        }
Esempio n. 18
0
        public IPersistable CreateRIFObject(ObjectType objectType, ref IntermediateFormatReader context)
        {
            IPersistable persistable = null;

            if (objectType == ObjectType.Null)
            {
                return(null);
            }
            IDOwner    parentIDOwner    = this.m_parentIDOwner;
            ReportItem parentReportItem = this.m_parentReportItem;

            switch (objectType)
            {
            case ObjectType.PageSection:
                persistable             = new PageSection(this.m_parentReportItem);
                this.m_parentReportItem = (ReportItem)persistable;
                break;

            case ObjectType.Line:
                persistable             = new Line(this.m_parentReportItem);
                this.m_parentReportItem = (ReportItem)persistable;
                break;

            case ObjectType.Rectangle:
                persistable             = new Rectangle(this.m_parentReportItem);
                this.m_parentReportItem = (ReportItem)persistable;
                break;

            case ObjectType.Image:
                persistable             = new Image(this.m_parentReportItem);
                this.m_parentReportItem = (ReportItem)persistable;
                break;

            case ObjectType.TextBox:
                persistable             = new TextBox(this.m_parentReportItem);
                this.m_parentReportItem = (ReportItem)persistable;
                break;

            case ObjectType.SubReport:
                persistable             = new SubReport(this.m_parentReportItem);
                this.m_parentReportItem = (ReportItem)persistable;
                break;

            case ObjectType.Grouping:
                persistable = new Grouping(ConstructionPhase.Deserializing);
                break;

            case ObjectType.Sorting:
                persistable = new Sorting(ConstructionPhase.Deserializing);
                break;

            case ObjectType.ReportItemCollection:
                persistable = new ReportItemCollection();
                break;

            case ObjectType.ReportItemIndexer:
                persistable = (IPersistable)(object)default(ReportItemIndexer);
                break;

            case ObjectType.Style:
                persistable = new Style(ConstructionPhase.Deserializing);
                break;

            case ObjectType.AttributeInfo:
                persistable = new AttributeInfo();
                break;

            case ObjectType.Visibility:
                persistable = new Visibility();
                break;

            case ObjectType.ExpressionInfo:
                persistable = new ExpressionInfo();
                break;

            case ObjectType.ExpressionInfoTypeValuePair:
                persistable = new ExpressionInfoTypeValuePair();
                break;

            case ObjectType.DataAggregateInfo:
                persistable = new DataAggregateInfo();
                break;

            case ObjectType.RunningValueInfo:
                persistable = new RunningValueInfo();
                break;

            case ObjectType.Filter:
                persistable = new Filter();
                break;

            case ObjectType.DataSource:
                persistable = new DataSource();
                break;

            case ObjectType.DataSet:
                persistable = new DataSet();
                break;

            case ObjectType.ReportQuery:
                persistable = new ReportQuery();
                break;

            case ObjectType.Field:
                persistable = new Field();
                break;

            case ObjectType.ParameterValue:
                persistable = new ParameterValue();
                break;

            case ObjectType.ReportSnapshot:
                persistable = new ReportSnapshot();
                break;

            case ObjectType.DocumentMapNode:
                persistable = new DocumentMapNode();
                break;

            case ObjectType.DocumentMapBeginContainer:
                persistable = DocumentMapBeginContainer.Instance;
                break;

            case ObjectType.DocumentMapEndContainer:
                persistable = DocumentMapEndContainer.Instance;
                break;

            case ObjectType.ReportInstance:
                persistable = new ReportInstance();
                break;

            case ObjectType.ParameterInfo:
                persistable = new ParameterInfo();
                break;

            case ObjectType.ValidValue:
                persistable = new ValidValue();
                break;

            case ObjectType.ParameterDataSource:
                persistable = new ParameterDataSource();
                break;

            case ObjectType.ParameterDef:
                persistable = new ParameterDef();
                break;

            case ObjectType.ProcessingMessage:
                persistable = new ProcessingMessage();
                break;

            case ObjectType.CodeClass:
                persistable = (IPersistable)(object)default(CodeClass);
                break;

            case ObjectType.Action:
                persistable = new Action();
                break;

            case ObjectType.RenderingPagesRanges:
                persistable = (IPersistable)(object)default(RenderingPagesRanges);
                break;

            case ObjectType.IntermediateFormatVersion:
                persistable = new IntermediateFormatVersion();
                break;

            case ObjectType.ImageInfo:
                persistable = new ImageInfo();
                break;

            case ObjectType.ActionItem:
                persistable = new ActionItem();
                break;

            case ObjectType.DataValue:
                persistable = new DataValue();
                break;

            case ObjectType.CustomReportItem:
                persistable             = new CustomReportItem(this.m_parentReportItem);
                this.m_parentReportItem = (ReportItem)persistable;
                break;

            case ObjectType.SortFilterEventInfoMap:
                persistable = new SortFilterEventInfoMap();
                break;

            case ObjectType.SortFilterEventInfo:
                persistable = new SortFilterEventInfo();
                break;

            case ObjectType.EndUserSort:
                persistable = new EndUserSort();
                break;

            case ObjectType.ScopeLookupTable:
                persistable = new ScopeLookupTable();
                break;

            case ObjectType.Tablix:
                persistable             = new Tablix(this.m_parentReportItem);
                this.m_parentReportItem = (ReportItem)persistable;
                break;

            case ObjectType.TablixHeader:
                persistable = new TablixHeader();
                break;

            case ObjectType.TablixMember:
                persistable = new TablixMember();
                break;

            case ObjectType.TablixColumn:
                persistable = new TablixColumn();
                break;

            case ObjectType.TablixRow:
                persistable = new TablixRow();
                break;

            case ObjectType.TablixCornerCell:
                persistable = new TablixCornerCell();
                break;

            case ObjectType.TablixCell:
                persistable = new TablixCell();
                break;

            case ObjectType.Chart:
                persistable             = new Chart(this.m_parentReportItem);
                this.m_parentReportItem = (ReportItem)persistable;
                break;

            case ObjectType.ChartMember:
                persistable = new ChartMember();
                break;

            case ObjectType.ChartSeries:
                persistable = new ChartSeries();
                break;

            case ObjectType.ChartDataPoint:
                persistable = new ChartDataPoint();
                break;

            case ObjectType.ChartDataPointValues:
                persistable = new ChartDataPointValues();
                break;

            case ObjectType.ChartArea:
                persistable = new ChartArea();
                break;

            case ObjectType.ChartLegend:
                persistable = new ChartLegend();
                break;

            case ObjectType.ChartLegendTitle:
                persistable = new ChartLegendTitle();
                break;

            case ObjectType.ChartAxis:
                persistable = new ChartAxis();
                break;

            case ObjectType.ThreeDProperties:
                persistable = new ChartThreeDProperties();
                break;

            case ObjectType.ChartDataLabel:
                persistable = new ChartDataLabel();
                break;

            case ObjectType.ChartMarker:
                persistable = new ChartMarker();
                break;

            case ObjectType.ChartTitle:
                persistable = new ChartTitle();
                break;

            case ObjectType.ChartAxisScaleBreak:
                persistable = new ChartAxisScaleBreak();
                break;

            case ObjectType.ChartDerivedSeries:
                persistable = new ChartDerivedSeries();
                break;

            case ObjectType.ChartBorderSkin:
                persistable = new ChartBorderSkin();
                break;

            case ObjectType.ChartNoDataMessage:
                persistable = new ChartNoDataMessage();
                break;

            case ObjectType.ChartItemInLegend:
                persistable = new ChartItemInLegend();
                break;

            case ObjectType.ChartEmptyPoints:
                persistable = new ChartEmptyPoints();
                break;

            case ObjectType.ChartNoMoveDirections:
                persistable = new ChartNoMoveDirections();
                break;

            case ObjectType.ChartFormulaParameter:
                persistable = new ChartFormulaParameter();
                break;

            case ObjectType.ChartLegendColumn:
                persistable = new ChartLegendColumn();
                break;

            case ObjectType.ChartLegendColumnHeader:
                persistable = new ChartLegendColumnHeader();
                break;

            case ObjectType.ChartLegendCustomItem:
                persistable = new ChartLegendCustomItem();
                break;

            case ObjectType.ChartLegendCustomItemCell:
                persistable = new ChartLegendCustomItemCell();
                break;

            case ObjectType.ChartAlignType:
                persistable = new ChartAlignType();
                break;

            case ObjectType.ChartElementPosition:
                persistable = new ChartElementPosition();
                break;

            case ObjectType.ChartSmartLabel:
                persistable = new ChartSmartLabel();
                break;

            case ObjectType.ChartStripLine:
                persistable = new ChartStripLine();
                break;

            case ObjectType.ChartAxisTitle:
                persistable = new ChartAxisTitle();
                break;

            case ObjectType.ChartCustomPaletteColor:
                persistable = new ChartCustomPaletteColor();
                break;

            case ObjectType.GridLines:
                persistable = new ChartGridLines();
                break;

            case ObjectType.ChartTickMarks:
                persistable = new ChartTickMarks();
                break;

            case ObjectType.DataMember:
                persistable = new DataMember();
                break;

            case ObjectType.CustomDataRow:
                persistable = new CustomDataRow();
                break;

            case ObjectType.DataCell:
                persistable = new DataCell();
                break;

            case ObjectType.Variable:
                persistable = new Variable();
                break;

            case ObjectType.Page:
                persistable = new Page();
                break;

            case ObjectType.Paragraph:
                persistable = new Paragraph();
                break;

            case ObjectType.TextRun:
                persistable = new TextRun();
                break;

            case ObjectType.Report:
                persistable             = new Report(this.m_parentReportItem);
                this.m_parentReportItem = (ReportItem)persistable;
                break;

            case ObjectType.GaugePanel:
                persistable             = new GaugePanel(this.m_parentReportItem);
                this.m_parentReportItem = (ReportItem)persistable;
                break;

            case ObjectType.GaugeMember:
                persistable = new GaugeMember();
                break;

            case ObjectType.GaugeRow:
                persistable = new GaugeRow();
                break;

            case ObjectType.GaugeCell:
                persistable = new GaugeCell();
                break;

            case ObjectType.BackFrame:
                persistable = new BackFrame();
                break;

            case ObjectType.CapImage:
                persistable = new CapImage();
                break;

            case ObjectType.FrameBackground:
                persistable = new FrameBackground();
                break;

            case ObjectType.FrameImage:
                persistable = new FrameImage();
                break;

            case ObjectType.CustomLabel:
                persistable = new CustomLabel();
                break;

            case ObjectType.GaugeImage:
                persistable = new GaugeImage();
                break;

            case ObjectType.GaugeInputValue:
                persistable = new GaugeInputValue();
                break;

            case ObjectType.GaugeLabel:
                persistable = new GaugeLabel();
                break;

            case ObjectType.GaugePanelItem:
                persistable = new GaugePanelItem();
                break;

            case ObjectType.GaugeTickMarks:
                persistable = new GaugeTickMarks();
                break;

            case ObjectType.LinearGauge:
                persistable = new LinearGauge();
                break;

            case ObjectType.LinearPointer:
                persistable = new LinearPointer();
                break;

            case ObjectType.LinearScale:
                persistable = new LinearScale();
                break;

            case ObjectType.NumericIndicator:
                persistable = new NumericIndicator();
                break;

            case ObjectType.PinLabel:
                persistable = new PinLabel();
                break;

            case ObjectType.PointerCap:
                persistable = new PointerCap();
                break;

            case ObjectType.PointerImage:
                persistable = new PointerImage();
                break;

            case ObjectType.RadialGauge:
                persistable = new RadialGauge();
                break;

            case ObjectType.RadialPointer:
                persistable = new RadialPointer();
                break;

            case ObjectType.RadialScale:
                persistable = new RadialScale();
                break;

            case ObjectType.ScaleLabels:
                persistable = new ScaleLabels();
                break;

            case ObjectType.ScalePin:
                persistable = new ScalePin();
                break;

            case ObjectType.ScaleRange:
                persistable = new ScaleRange();
                break;

            case ObjectType.IndicatorImage:
                persistable = new IndicatorImage();
                break;

            case ObjectType.StateIndicator:
                persistable = new StateIndicator();
                break;

            case ObjectType.Thermometer:
                persistable = new Thermometer();
                break;

            case ObjectType.TickMarkStyle:
                persistable = new TickMarkStyle();
                break;

            case ObjectType.TopImage:
                persistable = new TopImage();
                break;

            case ObjectType.LookupInfo:
                persistable = new LookupInfo();
                break;

            case ObjectType.LookupDestinationInfo:
                persistable = new LookupDestinationInfo();
                break;

            case ObjectType.ReportSection:
                persistable = new ReportSection();
                break;

            case ObjectType.MapFieldDefinition:
                persistable = new MapFieldDefinition();
                break;

            case ObjectType.MapFieldName:
                persistable = new MapFieldName();
                break;

            case ObjectType.MapLineLayer:
                persistable = new MapLineLayer();
                break;

            case ObjectType.MapShapefile:
                persistable = new MapShapefile();
                break;

            case ObjectType.MapPolygonLayer:
                persistable = new MapPolygonLayer();
                break;

            case ObjectType.MapSpatialDataRegion:
                persistable = new MapSpatialDataRegion();
                break;

            case ObjectType.MapSpatialDataSet:
                persistable = new MapSpatialDataSet();
                break;

            case ObjectType.MapPointLayer:
                persistable = new MapPointLayer();
                break;

            case ObjectType.MapTile:
                persistable = new MapTile();
                break;

            case ObjectType.MapTileLayer:
                persistable = new MapTileLayer();
                break;

            case ObjectType.MapField:
                persistable = new MapField();
                break;

            case ObjectType.MapLine:
                persistable = new MapLine();
                break;

            case ObjectType.MapPolygon:
                persistable = new MapPolygon();
                break;

            case ObjectType.MapPoint:
                persistable = new MapPoint();
                break;

            case ObjectType.MapLineTemplate:
                persistable = new MapLineTemplate();
                break;

            case ObjectType.MapPolygonTemplate:
                persistable = new MapPolygonTemplate();
                break;

            case ObjectType.MapMarkerTemplate:
                persistable = new MapMarkerTemplate();
                break;

            case ObjectType.Map:
                persistable             = new Map(this.m_parentReportItem);
                this.m_parentReportItem = (ReportItem)persistable;
                break;

            case ObjectType.MapBorderSkin:
                persistable = new MapBorderSkin();
                break;

            case ObjectType.MapDataRegion:
                persistable = new MapDataRegion(this.m_parentReportItem);
                break;

            case ObjectType.MapMember:
                persistable = new MapMember();
                break;

            case ObjectType.MapRow:
                persistable = new MapRow();
                break;

            case ObjectType.MapCell:
                persistable = new MapCell();
                break;

            case ObjectType.MapLocation:
                persistable = new MapLocation();
                break;

            case ObjectType.MapSize:
                persistable = new MapSize();
                break;

            case ObjectType.MapGridLines:
                persistable = new MapGridLines();
                break;

            case ObjectType.MapBindingFieldPair:
                persistable = new MapBindingFieldPair();
                break;

            case ObjectType.MapCustomView:
                persistable = new MapCustomView();
                break;

            case ObjectType.MapDataBoundView:
                persistable = new MapDataBoundView();
                break;

            case ObjectType.MapElementView:
                persistable = new MapElementView();
                break;

            case ObjectType.MapViewport:
                persistable = new MapViewport();
                break;

            case ObjectType.MapLimits:
                persistable = new MapLimits();
                break;

            case ObjectType.MapColorScale:
                persistable = new MapColorScale();
                break;

            case ObjectType.MapColorScaleTitle:
                persistable = new MapColorScaleTitle();
                break;

            case ObjectType.MapDistanceScale:
                persistable = new MapDistanceScale();
                break;

            case ObjectType.MapTitle:
                persistable = new MapTitle();
                break;

            case ObjectType.MapLegend:
                persistable = new MapLegend();
                break;

            case ObjectType.MapLegendTitle:
                persistable = new MapLegendTitle();
                break;

            case ObjectType.MapBucket:
                persistable = new MapBucket();
                break;

            case ObjectType.MapColorPaletteRule:
                persistable = new MapColorPaletteRule();
                break;

            case ObjectType.MapColorRangeRule:
                persistable = new MapColorRangeRule();
                break;

            case ObjectType.MapCustomColorRule:
                persistable = new MapCustomColorRule();
                break;

            case ObjectType.MapCustomColor:
                persistable = new MapCustomColor();
                break;

            case ObjectType.MapLineRules:
                persistable = new MapLineRules();
                break;

            case ObjectType.MapPolygonRules:
                persistable = new MapPolygonRules();
                break;

            case ObjectType.MapSizeRule:
                persistable = new MapSizeRule();
                break;

            case ObjectType.MapMarkerImage:
                persistable = new MapMarkerImage();
                break;

            case ObjectType.MapMarker:
                persistable = new MapMarker();
                break;

            case ObjectType.MapMarkerRule:
                persistable = new MapMarkerRule();
                break;

            case ObjectType.MapPointRules:
                persistable = new MapPointRules();
                break;

            case ObjectType.PageBreak:
                persistable = new PageBreak();
                break;

            case ObjectType.DataScopeInfo:
                persistable = new DataScopeInfo();
                break;

            case ObjectType.LinearJoinInfo:
                persistable = new LinearJoinInfo();
                break;

            case ObjectType.IntersectJoinInfo:
                persistable = new IntersectJoinInfo();
                break;

            case ObjectType.BucketedDataAggregateInfos:
                persistable = new BucketedDataAggregateInfos();
                break;

            case ObjectType.DataAggregateInfoBucket:
                persistable = new DataAggregateInfoBucket();
                break;

            case ObjectType.NumericIndicatorRange:
                persistable = new NumericIndicatorRange();
                break;

            case ObjectType.IndicatorState:
                persistable = new IndicatorState();
                break;

            case ObjectType.SharedDataSetQuery:
                persistable = new SharedDataSetQuery();
                break;

            case ObjectType.DataSetCore:
                persistable = new DataSetCore();
                break;

            case ObjectType.DataSetParameterValue:
                persistable = new DataSetParameterValue();
                break;

            case ObjectType.RIFVariantContainer:
                persistable = new RIFVariantContainer();
                break;

            case ObjectType.IdcRelationship:
                persistable = new IdcRelationship();
                break;

            case ObjectType.DefaultRelationship:
                persistable = new DefaultRelationship();
                break;

            case ObjectType.JoinCondition:
                persistable = new Relationship.JoinCondition();
                break;

            case ObjectType.BandLayoutOptions:
                persistable = new BandLayoutOptions();
                break;

            case ObjectType.LabelData:
                persistable = new LabelData();
                break;

            case ObjectType.Slider:
                persistable = new Slider();
                break;

            case ObjectType.Coverflow:
                persistable = new Coverflow();
                break;

            case ObjectType.PlayAxis:
                persistable = new PlayAxis();
                break;

            case ObjectType.BandNavigationCell:
                persistable = new BandNavigationCell();
                break;

            case ObjectType.Tabstrip:
                persistable = new Tabstrip();
                break;

            case ObjectType.NavigationItem:
                persistable = new NavigationItem();
                break;

            case ObjectType.ScopedFieldInfo:
                persistable = new ScopedFieldInfo();
                break;

            default:
                Global.Tracer.Assert(false, "Unsupported object type: " + objectType.ToString());
                break;
            }
            IDOwner iDOwner = persistable as IDOwner;

            if (iDOwner != null)
            {
                iDOwner.ParentInstancePath = this.m_parentIDOwner;
                this.m_parentIDOwner       = iDOwner;
            }
            persistable.Deserialize(context);
            this.m_parentIDOwner    = parentIDOwner;
            this.m_parentReportItem = parentReportItem;
            return(persistable);
        }