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

Paddings do not work as expected after updating from 515 to 619 - Bug?

3 Answers 36 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
DGPunkt
Top achievements
Rank 1
DGPunkt asked on 25 Jun 2008, 01:35 PM
Hello,

after having some trouble with RadChart until version 4.x, we just updated from "RadControls for ASP.NET AJAX 2008 1 515" to new "RadControls for ASP.NET AJAX 2008 1 619".

Here is our scenario:

RadChart (IntelligentLabelsEnabled = false -> http://www.telerik.com/community/forums/thread/b311D-begact.aspx#568759 ) with 2 ChartSeries of type Bar. ChartSeriesItem-Labels are visible and rotated by -90. In 515 all item labels at least had a small distance (about 5 px or so) to the plotareas border (top, bottom), depending on the length of the label´s text. In 619 all (long text) item labels just end at the border of the plotarea.

So I tried to work with margins and paddings (in 619), but paddings just do the opposite of what I want - in case of specifiing negative values you get funny results, too. Setting margins just had no visible effect. So I tried and tried, getting angry about that and tried to set margins in 515, where it worked as expected - So I think, it´s just a bug.


Greetings,
Daniel

3 Answers, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 26 Jun 2008, 10:16 AM
Hi DGPunkt,

Have you tried setting the margin values like this (it worked in our local test with the latest version of the control):

protected void PrepareChart1(RadChart chart) 
    chart.PlotArea.XAxis.Appearance.LabelAppearance.Visible = false
    chart.PlotArea.YAxis.Appearance.ValueFormat = ChartValueFormat.Currency; 
 
    ChartSeries dep1Series = new ChartSeries(); 
    dep1Series.Type = ChartSeriesType.Bar; 
    dep1Series.Name = "Department 1"
 
    dep1Series.AddItem(100000, "Company 1: 100.000"); 
    dep1Series.AddItem(150000, "Company 2: 150.000"); 
    dep1Series.AddItem(125000, "Company 3: 125.000"); 
    dep1Series.AddItem(140000, "Company 4: 140.000"); 
    dep1Series.AddItem(110000, "Company 5: 110.000"); 
 
 
 
    ChartSeries dep2Series = new ChartSeries(); 
    dep2Series.Type = ChartSeriesType.Bar; 
    dep2Series.Name = "Department 2"
 
    dep2Series.AddItem(140000, "Company 6: 140.000"); 
    dep2Series.AddItem(110000, "Company 7: 110.000"); 
    dep2Series.AddItem(100000, "Company 8: 100.000"); 
    dep2Series.AddItem(150000, "Company 9: 150.000"); 
    dep2Series.AddItem(125000, "Company 10: 125.000"); 
 
    chart.AddChartSeries(dep1Series); 
    chart.AddChartSeries(dep2Series); 
 
    dep1Series.Appearance.LabelAppearance.RotationAngle = -90; 
    dep2Series.Appearance.LabelAppearance.RotationAngle = -90; 
 
    dep1Series.Appearance.TextAppearance.Dimensions.Margins.Right = Telerik.Charting.Styles.Unit.Pixel(40); 
    dep2Series.Appearance.TextAppearance.Dimensions.Margins.Right = Telerik.Charting.Styles.Unit.Pixel(40); 



Best wishes,
Manuel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
DGPunkt
Top achievements
Rank 1
answered on 26 Jun 2008, 11:14 AM
Hi Manuel,

yes, interesting, that works, but it is not really satisfiing my needs:

I need to set margins for top and bottom (rotation = -90, so right AND left), because I also have negative values shown close to the bottom line. And if I set margins for both (right and left) it has no visible effect anymore as described in my first post.

dep1Series.Appearance.TextAppearance.Dimensions.Margins.Right = Telerik.Charting.Styles.Unit.Pixel(40); 
dep1Series.Appearance.TextAppearance.Dimensions.Margins.Left = 

Telerik.Charting.Styles.Unit.Pixel(40); 

Greetings,
Daniel

0
Giuseppe
Telerik team
answered on 30 Jun 2008, 02:49 PM
Hello DGPunkt,

Indeed it seems setting the left margin does not work as expected here -- we will forward your feedback to our developers so they can correct the behavior and optionally restore the behavior from the old version so there is no need to manually set the margin values.

We have updated your Telerik points for the report. For the time being if you would like to have some margin value, we would suggest you to rotate the labels to another angle like -45 degrees and not apply the margins.

Sorry for the temporary inconvenience.


Kind regards,
Manuel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Chart (Obsolete)
Asked by
DGPunkt
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
DGPunkt
Top achievements
Rank 1
Share this question
or