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

Charts and Bar Positions

1 Answer 88 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Markus
Top achievements
Rank 1
Markus asked on 14 Feb 2012, 04:18 PM
Hello there,

in my attachment you see a chart which I want to design with Telerik Reporting. The chart itself is no problem, my problem are these "extra" tables on the right.
As you can see, these tables display average values for each Series Bar as number values (1st number), average values for the smaller Bar (2nd number) and two symbols

The difficulty is that the numbers of displayed bars (i.e. SeriesItems) varies. It depends simply on User selection, the user can select 1 up to (theoretically infinite) numbers of series.

Now the Questions:
How can I calculate (dynamically) the Height for the right table rows? It will certainly have to be something like <Plotarea.Heigth>/<Series.Count> but with what offsets?

Is it better to use a Table or try to manually set Textblocks on the report? In that case - what would be the best way to calculate the textblocks positions?

TiA

Markus

1 Answer, 1 is accepted

Sort by
0
Elian
Telerik team
answered on 16 Feb 2012, 04:00 PM
Hello Markus,

As you might guess, there is no out of the box solution for such a custom requirement. We have attached a little sample that shows a possible solution. The idea is to put a Chart and a Table inside a Panel. Then you set Anchoring Top and Bottom to both items ( this makes the chart as high as the table). If you tweak the proportions a bit you can get a reasonable solution that will suit you.
The settings I have set to the chart:
  • Legend =  invisible (it gets too high and the text does not look right)
  • Chart Title = invisible (same reason)
  • YAxis, XAxis = invisible (same reason) 
  • ItemLabels = invisible (same reason) - the ones that are inside the plot area above the series
  • PlotArea.Margins = 0,0,0,0 (so the plot area takes the whole space of the chart)
Note: this is something that is considered a bit of a "hack" and we cannot guarantee you that it will look well in all cases. Our suggestion is to test it and alter it until it best suits your needs.

Greetings,
Elian
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
General Discussions
Asked by
Markus
Top achievements
Rank 1
Answers by
Elian
Telerik team
Share this question
or