This is a migrated thread and some comments may be shown as answers.
Stacked barchart How to..
1 Answer 40 Views
This is a migrated thread and some comments may be shown as answers.
Andy Green
Top achievements
Rank 2
Andy Green asked on 24 Aug 2017, 02:00 PM

Hi

I have a dataset containing the following data items

Location, Capacity & utilisation.

What I'm trying to do is have Location down the y Axis and show a stacked bar on the X with Capacity always at 100% and the utilisation shown over it with the actual data value shown as a % next to the bar.

I have gone through the help and docs but cant get what I need to show,  For example where is the DataPointValue in 2017 Barchart?

Andy

1 Answer, 1 is accepted

Sort by
0
Ivan Hristov
Telerik team
answered on 28 Aug 2017, 12:55 PM
Hi Andy,

If we correctly understand your requirement, you need stacked bar chart with two series - first (Capacity) is static and always peaks 100% and the second one (Utilisation) obtains its value from a data source and shows it as a part of the Capacity bar, presenting the ratio between them.

This can easily be done with series that have their ArrangeMode set to Stacked100. In your case the datasource can be simplified to only two fields - Location and Utilisation, since Capacity is always 100.
However, in Stacked100 mode the engine will calculate the ratio between the sum of the values of both series, so we need to adjust the X value of the Capacity series, filling it up to 100% with the following expression:
= 100 - Sum(Fields.Utilisation)

Please take a look at the attached screenshot and example report that demonstrate the layout described above.

We're always trying to keep our documentation up to date with our current release, so we'll appreciate it if you tell us which articles are obsolete and/or unclear, so we can improve it.
Our Graph item doesn't have class or property named DataPointValue. The data points are produced by GraphSeries instances and they provide simple coordinate properties like X/X0 and Y/Y0 to represent the current data point position.

If you have further questions, please do not hesitate to ask.

Regards,
Ivan Hristov
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
Asked by
Andy Green
Top achievements
Rank 2
Answers by
Ivan Hristov
Telerik team
Share this question
or