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

How to create Graph without databinding?

3 Answers 187 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Al
Top achievements
Rank 1
Iron
Iron
Iron
Al asked on 06 Sep 2016, 11:10 AM

Hi,

When creating a report programmatically, using the old charts for reporting I could populate the data for the chart directly using eg. series.Items.Add(mydataitem) - this way I could build a chart by simply inserting data items manually without any datasource. I am now using the new Graph object and I cannot figure out how to dot his - is it even possible?

3 Answers, 1 is accepted

Sort by
0
Katia
Telerik team
answered on 06 Sep 2016, 02:57 PM
Hi Al,

Data items(Graph) are connected to the data via DataSource components. To arrange the data for the Graph, my recommendation is to use one of the available Graph Wizards.

In case, you need to configure the Graph item programmatically check this kb article - Modifying or Creating a report at Run-Time.


Regards,
Katia
Telerik by Progress
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
0
Al
Top achievements
Rank 1
Iron
Iron
Iron
answered on 07 Sep 2016, 05:41 AM

Thanks Katia,

From your reply and the articles you linked it would appear then that it is not possible to manually add items to a graph? (by items I mean data items eg. bars on a bar chart)

0
Katia
Telerik team
answered on 07 Sep 2016, 11:19 AM
Hello Al,

Bars will be generated based on the expressions you specify in Graph's settings (for example for SeriesGroup.Grouping and BarSeries.X(Y) properties) and the data records retrieved for the Graph item.

You can change the Graph's DataSource at , however, adding bars manually will not be possible.

You can also check the demo reports provided with Telerik Reporting installation ([installtion folder]\Telerik\Reporting [version]\Examples\CSharp(VB)) to see how they are generated in code-behind.


Regards,
Katia
Telerik by Progress
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
General Discussions
Asked by
Al
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Katia
Telerik team
Al
Top achievements
Rank 1
Iron
Iron
Iron
Share this question
or