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

Graph Report - Dinamically show/hide plot area

1 Answer 93 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Guga
Top achievements
Rank 1
Guga asked on 15 Dec 2015, 12:33 AM

Hi,

 I have a requirement for a graph report that is grouped by a property and therefore shows a graph per each group.

 The desired look is for the legend to be at the top of the report and not to be repeated for each graph (number of series 'is'/'can be made to be constant' through each group). Also each graph is to have the same size.

From fiddling around I can think of 2 ways of doing this by hooking up to the ItemDataBinnding or ItemDataBound events:

- Show the legend for the first graph only and somehow make the graph (plot area) height the same as the other graphs.

- Add a dummy group of data that will become the first graph, show the legend only on this one and hide the plot area.

 

It appears that if I set the Visible property of the plot area to false at runtime the plot area is still visible. Also trying to set the plot area height to 0 does not work. Any suggestions?

 

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 17 Dec 2015, 04:14 PM
Hello Guga,

The Graph item's plot area is calculated dynamically based on the item's Size and the data that will be visualized. the size of labels and the number of series can change the size.

If you want Graph item's plot area to be of the same size, series number and displayed labels' length must be the same as well.

About the legend, it is per Graph item. You can use other item like Table (with rotated layout - 'Rotate Layout' option in the Context Menu of the item), which is bound to a collection of the fields used for creating Graph series.
To synchronize the colors, you can set a custom color palette for the Graph item, and then use the same colors as background for the cells of the Table item (the custom legend).
For more details check Formatting Series Colors (for the Graph) and conditional formatting (to style the Table item).


I hope the provided information is helpful.

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