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

Dynamic Series is not showing when preview in designer

1 Answer 58 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Levi
Top achievements
Rank 1
Levi asked on 09 May 2012, 01:50 AM
Telerik.Reporting.Charting.ChartSeries series = new Telerik.Reporting.Charting.ChartSeries();
            chart1.Series.Add(series);
            series.Type=Telerik.Reporting.Charting.ChartSeriesType.Line;
            series.Name = "My Series";
 
            Telerik.Reporting.Charting.ChartSeriesItem item = new Telerik.Reporting.Charting.ChartSeriesItem();
            item.XValue = 2;
            item.YValue = 35;
            series.AddItem(item);
             
 
            item = new Telerik.Reporting.Charting.ChartSeriesItem();
            item.XValue = 5;
            item.YValue = 45;
            series.AddItem(item);
             
 
            item = new Telerik.Reporting.Charting.ChartSeriesItem();
            item.XValue = 7;
            item.YValue = 45;
            series.AddItem(item);
 
            item = new Telerik.Reporting.Charting.ChartSeriesItem();
            item.XValue = 8;
            item.YValue = 41;
            series.AddItem(item);
 
            item = new Telerik.Reporting.Charting.ChartSeriesItem();
            item.XValue = 10;
            item.YValue = 35;
            series.AddItem(item);
 
            series.Appearance.PointMark.Dimensions.Width = 5;
            series.Appearance.PointMark.Dimensions.Height = 5;
            series.Appearance.PointMark.FillStyle.MainColor =
            System.Drawing.Color.Black;
            series.Appearance.PointMark.Visible = true;
Based on the above code, I added that in the initialize component function in telerik reporting, but when I click preview, it is just empty, no chart displayed.

Thanks

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 09 May 2012, 08:54 AM
Hi Levi,

As noted in the xx.Designer.cs, you should not modify the contents of this method manually. You can place your code in the report constructor just after InitializeComponent and it would work as expected. I've attached sample report.

Greetings,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

Tags
General Discussions
Asked by
Levi
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or