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

Set Chart Postion with Code

1 Answer 20 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Tim Sledge
Top achievements
Rank 1
Tim Sledge asked on 16 Nov 2008, 07:37 PM
Question 1:  I would like to set my ASP.Net Ajax Rad Chart to an absolute position on the page using VB.  Is there a way to do that?

Question 2:  How to I use VB to set the position of the PlotArea within the chart?

Thanks

1 Answer, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 17 Nov 2008, 08:12 AM
Hi Tim Sledge,

Onto your questions:
  • You can set absolute positioning to the chart control just like to any other WebControl like this:
    Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load 
        RadChart1.Attributes("style") = "z-index: 100; left: 368px; position: absolute; top: 232px" 
    End Sub 
  • You can customize the position of the PlotArea via customizing its margin value properties
  • RadChart1.PlotArea.Appearance.Dimensions.Margins.Bottom
  • RadChart1.PlotArea.Appearance.Dimensions.Margins.Top
  • RadChart1.PlotArea.Appearance.Dimensions.Margins.Left
  • RadChart1.PlotArea.Appearance.Dimensions.Margins.Right
For example specifying TopMargin=0 and BottomMargin=100 would place the PlotArea at the top part of the chart control.


All the best,
Manuel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Chart (Obsolete)
Asked by
Tim Sledge
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Share this question
or