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

pie chart alignment issue in reporting

2 Answers 50 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
saroja
Top achievements
Rank 1
saroja asked on 24 Sep 2009, 07:36 AM

 

hi!  I have create chart using xml data...I have use below code in chart need datasource event... I have get the output as pichart with salesorpurchasedesc column...But Now I want the output piechart with labels as itemlineamount data but this data in percentage format...and each salesorpurchase desc data left side of the pie chart that referring each itemline amount data..please help me...

chart needdatasource event
string
fileName = @"D:\text\jccantera\jccantera\jcc.xml";

 

 

var reader = new StreamReader(fileName);

 

 

XmlSerializer serializer = new XmlSerializer(typeof(NewDataSet));

 

 

var report = (NewDataSet)serializer.Deserialize(reader);

 

Telerik.Reporting.Processing.

Chart procChart = (Telerik.Reporting.Processing.Chart)sender;

 

 

DataSet ds = report;

 

procChart.DataSource = ds.Tables[

"BillItemLine"];

 

 

ChartSeries series = new ChartSeries();

 

series.DataYColumn =

"ItemLineAmount";

 

series.DataLabelsColumn =

"SalesOrPurchaseDesc";

 

series.Appearance.ShowLabelConnectors =

true;

 

 

JCChart.Series.Add(series);

 

procChart.DataSource = ds.Tables[

"BillItemLine"].DefaultView;

 

JCChart.DefaultType = Telerik.Reporting.Charting.

ChartSeriesType.Pie;

Xmldata

 

<

NewDataSet>

 

<

BillItemLine>

 

<

ItemLineAmount>844.35</ItemLineAmount>

 

<

ItemLineItemRefListID>350000-1247582799</ItemLineItemRefListID>

 

<

EstimateKey>Plan 804-1:804-1-502</EstimateKey>

 

<

Plan>804-1</Plan>

 

<

HouseAddress>3341 West Avenue, Beaumont</HouseAddress>

 

<

EstimateLineAmount>6000</EstimateLineAmount>

 

<

Name>804-1-502</Name>

 

<

SalesOrPurchaseDesc>Foundation Labor</SalesOrPurchaseDesc>

 

</

BillItemLine>

 

<

BillItemLine>

 

<

ItemLineAmount>84.87</ItemLineAmount>

 

<

ItemLineItemRefListID>370000-1247585073</ItemLineItemRefListID>

 

<

EstimateKey>Plan 804-1:804-1-633</EstimateKey>

 

<

Plan>804-1</Plan>

 

<

HouseAddress>3341 West Avenue, Beaumont</HouseAddress>

 

<

EstimateLineAmount>300</EstimateLineAmount>

 

<

Name>804-1-633</Name>

 

<

SalesOrPurchaseDesc>Portalet</SalesOrPurchaseDesc>

 

</

BillItemLine>

 

 



2 Answers, 1 is accepted

Sort by
0
saroja
Top achievements
Rank 1
answered on 25 Sep 2009, 06:11 AM
hi! can u please help me............
0
Steve
Telerik team
answered on 25 Sep 2009, 11:20 AM
Hi saroja,

Take a look at the following blog posts on the matter:

All the best,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
saroja
Top achievements
Rank 1
Answers by
saroja
Top achievements
Rank 1
Steve
Telerik team
Share this question
or