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

Chart data not binding.

1 Answer 35 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Zeya Bakhtyar
Top achievements
Rank 1
Zeya Bakhtyar asked on 06 Aug 2010, 12:21 AM
Scenario:

Generating a report and datasource is being assigned from code behind. Report has a table and a chart.

Issue:

Table generates correctly but chart does not. How do I tell chart what column to plot? I looked at the documentation but was not very helpful. Is there a way to debug if the chart's datasource is assigned correctly?

Thank you.

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 10 Aug 2010, 05:08 PM
Hi Zeya,

As the Chart help article explains, you can bind the Chart item:
  • From the Report Designer by setting its DataSource property
  • By using its NeedDataSource event
If the latter, you should set the DataSource property to the processing chart item i.e.:

private void chart1_NeedDataSource(object sender, System.EventArgs e)
{
    Telerik.Reporting.Processing.Chart procChart = (Telerik.Reporting.Processing.Chart)sender;
    procChart.DataSource = your_datasource;
}

Except the documentation which covers the programmatic binding of the chart, you can review the chart series collection editor for properties specifying the columns to plot when binding declaratively. You can review our demo reports containing chart items to see how we have bound them.

Regards,
Steve
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Zeya Bakhtyar
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or