This is a migrated thread and some comments may be shown as answers.

Is chart styles override each other ?

3 Answers 31 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mohammed
Top achievements
Rank 2
Mohammed asked on 03 Mar 2013, 09:11 PM
Dear team,
I'm afraid to say I got crazy with the chart styles or its configuration in general.
I try to study the documentation and make implementation to a sample static chart I created.
I assigned a skin to the chart at the beginning and after that i tried to customize the styles according to what i read in the documentation but almost every time i don't see the updated styles.
now I see in the design mode some of my styles but when I run it in the preview mode I can't see it "check the attached photo"
is chart styles override each other ? and if yes how can i know what override what ?
we are attending to buy the reporting tool but as you see I have troubles to understand the chart.
Regards,
Mohammed

3 Answers, 1 is accepted

Sort by
0
Mohammed
Top achievements
Rank 2
answered on 03 Mar 2013, 11:49 PM
this is the generated code behind for more details :

  #region Component Designer generated code
        /// <summary>
        /// Required method for telerik Reporting designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent() {
            Telerik.Reporting.Charting.Styles.Corners corners1 = new Telerik.Reporting.Charting.Styles.Corners();
            Telerik.Reporting.Charting.Styles.ChartMargins chartMargins1 = new Telerik.Reporting.Charting.Styles.ChartMargins();
            Telerik.Reporting.Charting.Styles.Corners corners2 = new Telerik.Reporting.Charting.Styles.Corners();
            Telerik.Reporting.Charting.ChartSeries chartSeries1 = new Telerik.Reporting.Charting.ChartSeries();
            Telerik.Reporting.Charting.ChartSeriesItem chartSeriesItem1 = new Telerik.Reporting.Charting.ChartSeriesItem();
            Telerik.Reporting.Charting.ChartSeriesItem chartSeriesItem2 = new Telerik.Reporting.Charting.ChartSeriesItem();
            Telerik.Reporting.Charting.ChartSeriesItem chartSeriesItem3 = new Telerik.Reporting.Charting.ChartSeriesItem();
            Telerik.Reporting.Charting.ChartSeriesItem chartSeriesItem4 = new Telerik.Reporting.Charting.ChartSeriesItem();
            Telerik.Reporting.Charting.ChartSeries chartSeries2 = new Telerik.Reporting.Charting.ChartSeries();
            Telerik.Reporting.Charting.ChartSeriesItem chartSeriesItem5 = new Telerik.Reporting.Charting.ChartSeriesItem();
            Telerik.Reporting.Charting.ChartSeriesItem chartSeriesItem6 = new Telerik.Reporting.Charting.ChartSeriesItem();
            Telerik.Reporting.Charting.ChartSeriesItem chartSeriesItem7 = new Telerik.Reporting.Charting.ChartSeriesItem();
            Telerik.Reporting.Charting.ChartSeriesItem chartSeriesItem8 = new Telerik.Reporting.Charting.ChartSeriesItem();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NumberOfQRCodesReport));
            Telerik.Reporting.Drawing.StyleRule styleRule1 = new Telerik.Reporting.Drawing.StyleRule();
            this.pageHeaderSection1 = new Telerik.Reporting.PageHeaderSection();
            this.detail = new Telerik.Reporting.DetailSection();
            this.chart1 = new Telerik.Reporting.Chart();
            this.chart2 = new Telerik.Reporting.Chart();
            this.sqlDataSource1 = new Telerik.Reporting.SqlDataSource();
            this.pageFooterSection1 = new Telerik.Reporting.PageFooterSection();
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            // 
            // pageHeaderSection1
            // 
            this.pageHeaderSection1.Height = Telerik.Reporting.Drawing.Unit.Inch(0.3999999463558197D);
            this.pageHeaderSection1.Name = "pageHeaderSection1";
            // 
            // detail
            // 
            this.detail.Height = Telerik.Reporting.Drawing.Unit.Inch(7.6000003814697266D);
            this.detail.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
            this.chart1,
            this.chart2});
            this.detail.Name = "detail";
            // 
            // chart1
            // 
            this.chart1.AutoLayout = true;
            this.chart1.BitmapResolution = 96F;
            this.chart1.ChartTitle.Appearance.Border.Color = System.Drawing.Color.DimGray;
            corners1.BottomLeft = Telerik.Reporting.Charting.Styles.CornerType.Round;
            corners1.BottomRight = Telerik.Reporting.Charting.Styles.CornerType.Round;
            corners1.RoundSize = 6;
            corners1.TopLeft = Telerik.Reporting.Charting.Styles.CornerType.Round;
            corners1.TopRight = Telerik.Reporting.Charting.Styles.CornerType.Round;
            this.chart1.ChartTitle.Appearance.Corners = corners1;
            chartMargins1.Bottom = new Telerik.Reporting.Charting.Styles.Unit(14D, Telerik.Reporting.Charting.Styles.UnitType.Pixel);
            chartMargins1.Left = new Telerik.Reporting.Charting.Styles.Unit(0D, Telerik.Reporting.Charting.Styles.UnitType.Percentage);
            chartMargins1.Right = new Telerik.Reporting.Charting.Styles.Unit(10D, Telerik.Reporting.Charting.Styles.UnitType.Pixel);
            chartMargins1.Top = new Telerik.Reporting.Charting.Styles.Unit(4D, Telerik.Reporting.Charting.Styles.UnitType.Percentage);
            this.chart1.ChartTitle.Appearance.Dimensions.Margins = chartMargins1;
            this.chart1.ChartTitle.Appearance.FillStyle.GammaCorrection = false;
            this.chart1.ChartTitle.Appearance.FillStyle.MainColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
            this.chart1.ChartTitle.Appearance.Position.AlignedPosition = Telerik.Reporting.Charting.Styles.AlignedPositions.Top;
            this.chart1.ChartTitle.TextBlock.Appearance.TextProperties.Font = new System.Drawing.Font("Verdana", 11.25F);
            this.chart1.ChartTitle.TextBlock.Text = "Number of QR Codes";
            this.chart1.ImageFormat = System.Drawing.Imaging.ImageFormat.Emf;
            this.chart1.Legend.Appearance.Border.Color = System.Drawing.Color.DimGray;
            this.chart1.Legend.Appearance.ItemTextAppearance.TextProperties.Color = System.Drawing.Color.DimGray;
            this.chart1.Legend.Appearance.Visible = false;
            this.chart1.Legend.Visible = false;
            this.chart1.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0.40000000596046448D), Telerik.Reporting.Drawing.Unit.Inch(0.20000012218952179D));
            this.chart1.Name = "chart1";
            this.chart1.PlotArea.Appearance.Border.Color = System.Drawing.Color.DimGray;
            corners2.BottomLeft = Telerik.Reporting.Charting.Styles.CornerType.Round;
            corners2.BottomRight = Telerik.Reporting.Charting.Styles.CornerType.Round;
            corners2.RoundSize = 6;
            corners2.TopLeft = Telerik.Reporting.Charting.Styles.CornerType.Round;
            corners2.TopRight = Telerik.Reporting.Charting.Styles.CornerType.Round;
            this.chart1.PlotArea.Appearance.Corners = corners2;
            this.chart1.PlotArea.Appearance.FillStyle.FillType = Telerik.Reporting.Charting.Styles.FillType.Solid;
            this.chart1.PlotArea.Appearance.FillStyle.MainColor = System.Drawing.Color.White;
            this.chart1.PlotArea.XAxis.Appearance.Color = System.Drawing.Color.Blue;
            this.chart1.PlotArea.XAxis.Appearance.LabelAppearance.Position.AlignedPosition = Telerik.Reporting.Charting.Styles.AlignedPositions.Center;
            this.chart1.PlotArea.XAxis.Appearance.MajorGridLines.Color = System.Drawing.Color.DimGray;
            this.chart1.PlotArea.XAxis.Appearance.MajorGridLines.Width = 0F;
            this.chart1.PlotArea.XAxis.Appearance.MajorTick.Visible = false;
            this.chart1.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color = System.Drawing.Color.Blue;
            this.chart1.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold);
            this.chart1.PlotArea.XAxis.AxisLabel.Appearance.RotationAngle = 40F;
            this.chart1.PlotArea.XAxis.AxisLabel.Appearance.Visible = true;
            this.chart1.PlotArea.XAxis.AxisLabel.TextBlock.Appearance.Position.AlignedPosition = Telerik.Reporting.Charting.Styles.AlignedPositions.Right;
            this.chart1.PlotArea.XAxis.AxisLabel.TextBlock.Appearance.TextProperties.Color = System.Drawing.Color.Red;
            this.chart1.PlotArea.XAxis.AxisLabel.TextBlock.Appearance.TextProperties.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Bold);
            this.chart1.PlotArea.XAxis.AxisLabel.TextBlock.Text = "QR Types";
            this.chart1.PlotArea.XAxis.AxisLabel.Visible = true;
            this.chart1.PlotArea.XAxis.MaxValue = 4D;
            this.chart1.PlotArea.XAxis.MinValue = 1D;
            this.chart1.PlotArea.YAxis.Appearance.MajorGridLines.Color = System.Drawing.Color.DimGray;
            this.chart1.PlotArea.YAxis.AxisLabel.TextBlock.Appearance.TextProperties.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Bold);
            this.chart1.PlotArea.YAxis.AxisLabel.TextBlock.Text = "# of Creation";
            this.chart1.PlotArea.YAxis.AxisMode = Telerik.Reporting.Charting.ChartYAxisMode.Extended;
            this.chart1.PlotArea.YAxis.MaxValue = 35D;
            this.chart1.PlotArea.YAxis.Step = 5D;
            this.chart1.PlotArea.YAxis2.AxisLabel.TextBlock.Appearance.TextProperties.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Bold);
            chartSeries1.Appearance.Border.Color = System.Drawing.Color.DimGray;
            chartSeries1.Appearance.FillStyle.MainColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(186)))), ((int)(((byte)(74)))));
            chartSeries1.Appearance.FillStyle.SecondColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(244)))), ((int)(((byte)(227)))));
            chartSeries1.DefaultLabelValue = "#ITEM";
            chartSeriesItem1.Name = "Facebook";
            chartSeriesItem1.YValue = 5D;
            chartSeriesItem2.Name = "Twitter";
            chartSeriesItem2.YValue = 10D;
            chartSeriesItem3.Name = "YouTube";
            chartSeriesItem3.YValue = 20D;
            chartSeriesItem4.Name = "LinkedIn";
            chartSeriesItem4.YValue = 30D;
            chartSeries1.Items.AddRange(new Telerik.Reporting.Charting.ChartSeriesItem[] {
            chartSeriesItem1,
            chartSeriesItem2,
            chartSeriesItem3,
            chartSeriesItem4});
            chartSeries1.Name = "QR Codes Types";
            this.chart1.Series.AddRange(new Telerik.Reporting.Charting.ChartSeries[] {
            chartSeries1});
            this.chart1.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(6.7000007629394531D), Telerik.Reporting.Drawing.Unit.Inch(3.5999212265014648D));
            this.chart1.Skin = "Colorful";
            // 
            // chart2
            // 
            this.chart2.BitmapResolution = 96F;
            this.chart2.ChartTitle.TextBlock.Text = "QR Codes";
            this.chart2.DefaultType = Telerik.Reporting.Charting.ChartSeriesType.Pie;
            this.chart2.ImageFormat = System.Drawing.Imaging.ImageFormat.Emf;
            this.chart2.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0.3999999463558197D), Telerik.Reporting.Drawing.Unit.Inch(3.9000003337860107D));
            this.chart2.Name = "chart2";
            this.chart2.PlotArea.XAxis.Appearance.MajorGridLines.PenStyle = System.Drawing.Drawing2D.DashStyle.DashDotDot;
            this.chart2.PlotArea.XAxis.Appearance.MajorTick.Visible = false;
            this.chart2.PlotArea.XAxis.MaxValue = 4D;
            this.chart2.PlotArea.XAxis.MinValue = 1D;
            this.chart2.PlotArea.YAxis.Appearance.MajorTick.Visible = false;
            this.chart2.PlotArea.YAxis.Appearance.MinorTick.Visible = false;
            chartSeries2.DefaultLabelValue = "#ITEM - (#Y)";
            chartSeriesItem5.Appearance.Exploded = true;
            chartSeriesItem5.Name = "Facebook";
            chartSeriesItem5.YValue = 20D;
            chartSeriesItem6.Name = "Twitter";
            chartSeriesItem6.YValue = 30D;
            chartSeriesItem7.Name = "YouTube";
            chartSeriesItem7.YValue = 60D;
            chartSeriesItem8.Name = "LinkedIn";
            chartSeriesItem8.YValue = 20D;
            chartSeries2.Items.AddRange(new Telerik.Reporting.Charting.ChartSeriesItem[] {
            chartSeriesItem5,
            chartSeriesItem6,
            chartSeriesItem7,
            chartSeriesItem8});
            chartSeries2.Name = "QR Codes";
            chartSeries2.Type = Telerik.Reporting.Charting.ChartSeriesType.Pie;
            this.chart2.Series.AddRange(new Telerik.Reporting.Charting.ChartSeries[] {
            chartSeries2});
            this.chart2.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(6.7000007629394531D), Telerik.Reporting.Drawing.Unit.Inch(3.5D));
            // 
            // sqlDataSource1
            // 
            this.sqlDataSource1.ConnectionString = "Bartizan.LeadsLightning.Reports.Properties.Settings.lldn";
            this.sqlDataSource1.Name = "sqlDataSource1";
            this.sqlDataSource1.SelectCommand = resources.GetString("sqlDataSource1.SelectCommand");
            // 
            // pageFooterSection1
            // 
            this.pageFooterSection1.Height = Telerik.Reporting.Drawing.Unit.Inch(0.40000024437904358D);
            this.pageFooterSection1.Name = "pageFooterSection1";
            // 
            // NumberOfQRCodesReport
            // 
            this.DataSource = null;
            this.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {
            this.pageHeaderSection1,
            this.detail,
            this.pageFooterSection1});
            this.Name = "NumberOfQRCodesReport";
            this.PageSettings.Landscape = true;
            this.PageSettings.Margins = new Telerik.Reporting.Drawing.MarginsU(Telerik.Reporting.Drawing.Unit.Inch(1D), Telerik.Reporting.Drawing.Unit.Inch(1D), Telerik.Reporting.Drawing.Unit.Inch(1D), Telerik.Reporting.Drawing.Unit.Inch(1D));
            this.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.A4;
            this.Style.BackgroundColor = System.Drawing.Color.White;
            styleRule1.Selectors.AddRange(new Telerik.Reporting.Drawing.ISelector[] {
            new Telerik.Reporting.Drawing.TypeSelector(typeof(Telerik.Reporting.TextItemBase)),
            new Telerik.Reporting.Drawing.TypeSelector(typeof(Telerik.Reporting.HtmlTextBox))});
            styleRule1.Style.Padding.Left = Telerik.Reporting.Drawing.Unit.Point(2D);
            styleRule1.Style.Padding.Right = Telerik.Reporting.Drawing.Unit.Point(2D);
            this.StyleSheet.AddRange(new Telerik.Reporting.Drawing.StyleRule[] {
            styleRule1});
            this.Width = Telerik.Reporting.Drawing.Unit.Inch(7.5D);
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
 
        }
        #endregion
0
Hadib Ahmabi
Top achievements
Rank 1
answered on 04 Mar 2013, 01:31 PM
When you use chart skin, it overrides all the properties that the skin itself sets. If you want to use a skin and work on top of it, you should do it programmatically in the report constructor (after the skins has actually been applied). 
0
Mohammed
Top achievements
Rank 2
answered on 04 Mar 2013, 01:49 PM
aha no i see
thanks very much.
Regards,
Mohammed
Tags
General Discussions
Asked by
Mohammed
Top achievements
Rank 2
Answers by
Mohammed
Top achievements
Rank 2
Hadib Ahmabi
Top achievements
Rank 1
Share this question
or