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

Hide scroll

1 Answer 60 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Golu
Top achievements
Rank 1
Golu asked on 10 Jul 2009, 12:56 PM
Dear sir,

I am Craeating a pie chart and disaplay in RadDock.
the problem is chart shows scroll in dock. I wants to remove scroll.
I am not giving chart heigth and dock also [dock created dynamically).

and how can I change chart colors.?
help me plz

thank with regards

1 Answer, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 15 Jul 2009, 01:31 PM
Hello Golu,


1. RadDock

You can hide the scroll bars of the RadDock by overriding the CSS class of its content. Here is the source code that does this (please note that if the !important flag is omitted the CSS class will not be applied). 

<style type="text/css">  
    .rdContent 
    {  
        overflow: hidden !important;  
    }  
</style> 

In case you need to change the width and the height of the dock according to its content, our suggestion is to handle the OnClientInitialize client event, get the bounds of the RadDock's content and change accordingly the height and the width of the dock. Here is a sample event handler method (for the OnClientInitialize event) that does that:

function DockInitialize(dock, args) 
    var innerDiv = $get(dock.get_id() + '_C'); 
    var innerDivSize = $telerik.getBounds(innerDiv); 
 
    dock.set_width(innerDivSize.width); 


2. RadChart

To change the colors of the series elements in RadChart you can define a custom color palette containing the desired colors. Here is how to do this:
    <telerik:RadChart ID="RadChart1" runat="server" SeriesPalette="customPalette"
        <CustomPalettes> 
            <telerik:Palette Name="customPalette"
                <Items> 
                    <telerik:PaletteItem MainColor="Blue" SecondColor="Blue" /> 
                    <telerik:PaletteItem MainColor="Red" SecondColor="Red" /> 
                    <telerik:PaletteItem MainColor="Yellow" SecondColor="Yellow" /> 
                    <telerik:PaletteItem MainColor="Green" SecondColor="Green" /> 
                </Items> 
            </telerik:Palette> 
        </CustomPalettes> 
    </telerik:RadChart> 
Note that the SeriesPalette property of RadChart should be explicitly set to the name of the palette.

Kind regards,
Pero
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Chart (Obsolete)
Asked by
Golu
Top achievements
Rank 1
Answers by
Pero
Telerik team
Share this question
or