Pie Chart Backward Compatibility


Author
Message
Vahid Mesri
Vahid Mesri
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)
Group: Forum Members
Posts: 11, Visits: 67
Hi,
We have recently updated the Nevron component on our server to the latest version. Unfortunately the following lines couldn't be compiled for one of our existing pie charts:

series1.BeginAngle = 90;
series1.InnerRadius = new NLength(30, NRelativeUnit.ParentPercentage);
series1.Radius = new NLength(50, NRelativeUnit.ParentPercentage);


Where Series1 is a NPieChart:
NPieChart pieChart1 = context.document.Charts[0] as NPieChart;

Can you please tell us how we can set the mentioned properties for the pie chart?

Thanks a lot,
Vahid
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

Hi Vahid,

The BeginAngle, Radius and InnerRadius are member of NPieChart - in previous versions of the control they were members of the NPieSeries - which was not correct in our view. The following code shows how to specify those properties in a simple pie chart:

   nChartControl1.Panels.Clear();

   NPieChart pieChart = new NPieChart();

   nChartControl1.Panels.Add(pieChart);
   pieChart.BeginAngle = 90;
   pieChart.InnerRadius = new NLength(30, NRelativeUnit.ParentPercentage);
   pieChart.Radius = new NLength(50, NRelativeUnit.ParentPercentage);

   NPieSeries pieSeries = new NPieSeries();
   pieSeries.PieStyle = PieStyle.Ring;
   pieSeries.Values.Add(10);
   pieSeries.Values.Add(20);
   pieSeries.Values.Add(30);
   pieChart.Series.Add(pieSeries);

Hope this helps - let us know if you meet any problems or have any questions.


Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search