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

Graph with multiple line series - how to configure with data passed as DataContext at runtime

1 Answer 42 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Bartosz
Top achievements
Rank 1
Bartosz asked on 28 May 2018, 07:42 AM

Hi,


I need a chart with one or more line series, configured in stand alone RD.
The line series are Numerical on both axes (it's a temperature (X) vs value (Y) plot).

The data for the Graph will be provided at runtime through object reference.

My data source format is as follows:
```
class Data
{
   List<double> Temperature {g;s;}
   List<double> Value {g;s}
}
```
I was able to 'import' the dll to the designer and the data source was set up correctly (I know this because I'm able to use other data sources to successfully populate other elements of the report).

----------------------------------

What I did so far?
* I inserted a new line graph into the report
* I tried setting the Category to Temperature and Value to Value in the Wizard
* I named the graph to be able to find it at runtime and set it's DataSource
* In various attempts to configure the graph I tried setting the X and Y axes of the Graph to Numerical type or X to Category and Y to Numerical (I get the legend and axes preview in the designer)
* At runtime I set the DataSource of the Graph the same way as DataSource of a Table (which works ok for the table): `((Graph)(report.Items.Find("nameOfGraph", true)[0])).DataSource = dataSourceObject;`

The problem I have is that there are no series in the generated report in the Graph while other parts of the report are populated correctly.

Could you please provide me with a walktrough of how to configure a line Graph in Report Designer with the assumption that the data will be provided at runtime?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 31 May 2018, 06:55 AM
Hello Bartosz,

We have already responded to your post with identical query (ticket #1169148). A sample solution demonstrating the proposed approach is also attached there - check A walktrough of how to configure a line Graph in report designer with data provided at runtime.

Regards,
Todor
Progress Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
Report Designer (standalone)
Asked by
Bartosz
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or