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

Graph extended on several pages possible?

1 Answer 64 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Eldar
Top achievements
Rank 1
Eldar asked on 16 Sep 2020, 01:18 PM
Hi, I have a graph(stacked bars type) that is for showing departments. At the moment its on one page, its height is enough to display 40 departments, however if the data includes more than 40 the graph will still just be one page, not displaying the remaining data. 

Is it possible to make the graph extend onto the next page/grow untill it has displayed all the data? 
If no, is it possible to program the height somehow through code (so i could calculate the correct height based on the data it will receive)?

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 21 Sep 2020, 07:55 AM

Hi Eldar,

The Graph does not grow vertically and tries to accommodate its data withing the design-time area. The Graph may extend on 2 or more pages, provided its design-time height occupies this height. See this silent video for reference. Note that when I reduce the data, the Graph height preserves, and the bars become wider.

You may use Bindings to manipulate Graph Height. Note that Graph Bindings are evaluated against the parent object's data source, hence if the Graph is within the report, the Graph DataSource should be bound to the data source of the report.

I have attached a sample report demonstrating the above. Here are the Bindings I used to set the Graph DataSource and Height dynamically:

Property path		|	Expression
DataSource		|	= ReportItem.DataObject
Height			|	=IIf(Count(Fields.category) <= 40, '8in', '16in')

You may switch between the two CsvDataSources in the sample report to observe the difference. Note that the DataSource is set to the Report. For that reason, I have placed the Graph in the Report Header and hidden the detail section as the latter is generated for each Report DataSource record.

Regards,
Todor
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

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