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

How to add table data to chart

3 Answers 263 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 18 May 2012, 06:52 AM
Hello there,

i want to add table data to a chart, like i would do this in excel, but the result i want to have dont come out.
I want to create a bar chart which show me the allocation af diffenrent sortiments...(this table):

sortiment X sortiment Y  sortiment Z ...
12,5 % 20 %  50%  ...

and the result should look like the attached file (excample), but the 1,2,3 should be the sortiments and the yaxis show the percentage.
When i add a table which look like the table above, i get this result (attached file: wrong).
When i add only the data (12,5 % , 20 %, ...) to the chart i get a bar chart with the percantage, and a legend with the field names of m variables, but thats not what i want.
I hope you understand my problem :)

Thanks,
Thomas.


[Edit]: I dont use the telerik report viewer to create an excel sheet or view the report...I use the ReportProcessor and the RenderReport to create an excel sheet on the fly on a database.

[Edit 2]: I found a solution. I create a DataTable with the values i want and the column names for the legend.

3 Answers, 1 is accepted

Sort by
0
Thomas
Top achievements
Rank 1
answered on 21 May 2012, 11:40 AM
Hi there its me again,
now i get m diagramms, but they dont look like i want it to and i dont find a solution to personalize my chart. My DataSource of the chart is a DataTable i create virtually, like:

ABC DEF HIJ ...
2 5 1 ...

Now the result is not the one i want to create...I want something like Diagram1. But i get Diagram2.

How can i personalizie my x-axis and the legend etc. The Telerik Reporting Documentation (http://www.telerik.com/help/reporting/stylingelements.html) dont help me.

Thanks
0
Petio Petkov
Telerik team
answered on 22 May 2012, 04:15 PM
Hi Thomas,

Telerik Reporting Tool uses the RadChart for ASP.NET AJAX itself, so you could use the RadChart's online demos as a reference too.
All you need to do is to set the Chart's PlotArea.XAxis value and hide the legend by setting the  Chart's Legend.Visible prroperty to false.
You can find attached simple report definition against the AdventureWorks database.

All the best,
Petio Petkov
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
Thomas
Top achievements
Rank 1
answered on 25 May 2012, 08:55 AM
Hi Petio,

thanks for your help! That works fine :)

Regards,
Thomas
Tags
General Discussions
Asked by
Thomas
Top achievements
Rank 1
Answers by
Thomas
Top achievements
Rank 1
Petio Petkov
Telerik team
Share this question
or