New to Telerik UI for WinFormsStart a free 30-day trial

Rotate charts in RadRotator or RadCarousel

Updated over 6 months ago
Product VersionProductAuthorLast modified
Q2 2008RadControls for WinFormsMartin Vassilev9/15/2008

HOW-TO Rotate a custom RadChart object by using RadRotator or RadCarousel and preserve all visual efects that hold out this controls.

SOLUTION Even though it is very easy to add RadChart directly by using RadHostItem, RadRotator and RadCarousel performs much better with images and/or other windowless RadItems. This is why the more suitable approach here would be to convert the charts into images and then to add these in the rotator wrapped in RadImageItems. This way the slideshow can also take advantage of the slide animation features of the RadRotator control.

C#
//add single chart item to the RadRotator  
{  
    RadChart myChart = ChartCreator.Create(i);  
    myChart.Size = this.radRotator1.Size;  
    Image chartAsImage = myChart.GetBitmap();  
    RadImageItem imageItem = new RadImageItem();  
    imageItem.Image = chartAsImage;  
    this.radRotator1.Items.Add(imageItem);  
}  
      
//add single chart item to the RadCarousel  
{  
    RadChart myChart = ChartCreator.Create(i);  
    myChart.Size = new Size(400, 300);  
    Image chartAsImage = myChart.GetBitmap();  
    RadImageItem imageItem = new RadImageItem();  
    imageItem.Image = chartAsImage;  
    this.radCarousel1.Items.Add(imageItem);  
}  
Not finding the help you need?
Contact Support