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

[Solved] Pie Chart "AutoSizing" -- want to disable

1 Answer 158 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Fooberichu
Top achievements
Rank 2
Fooberichu asked on 26 Feb 2008, 06:21 PM
I have a pie chart (see this thread for how I'm implementing it http://www.telerik.com/community/forums/thread/b311D-bcdmbm.aspx).  Anyway, I want to set the TOTAL size of the image to something like 600x400 but have the pie chart a little smaller because I want to show the legend without having the legend superimpose over the chart.

I have no idea how to accomplish something like this, everytime I try to resize the chart (using RadChart.Width = Unit.Pixel(600); and RadChart.Height = Unit.Pixel(400); it automatically scales the chart with it (as well as all the labels and stuff). 

Can I manually set the chart and label sizes and then introduce my legend so I know what the heck I'm looking at?

1 Answer, 1 is accepted

Sort by
0
Fooberichu
Top achievements
Rank 2
answered on 26 Feb 2008, 07:18 PM
Ok... I figured it out.  So I set:

RadChart1.Width = Unit.Pixel(600);
RadChart1.Height = Unit.Pixel(400);

// later on
s0.Appearance.DiameterScale = .60; // 60 %
s0.Appearance.CenterXOffset = -50; // 50 pixels, leave room for the legend
s0.PlotArea.Appearance.Dimensions.Margins.Left = 10; // more room for chart and legend
s0.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.ItemLabels;

Now it works great!  Additionally, doing it this way I don't have to have the HTTPHandler in my web.config (nice for DNN, that'd have been one more thing to remember when updating my DNN installation).
Tags
Chart (Obsolete)
Asked by
Fooberichu
Top achievements
Rank 2
Answers by
Fooberichu
Top achievements
Rank 2
Share this question
or