I have a plain radchart. Only thing is I want to have a black border around the plotarea something you see in Ajax radchart like the attached file.
Can I achieve this via code behind?
1 Answer, 1 is accepted
0
Evgenia
Telerik team
answered on 23 Aug 2011, 11:49 AM
Hi Mariusz,
Currently there is no direct way to set Border for the ChartArea. However you may use the following approach: wire to the LayoutUpdated event of the ChartArea and add the following code lines that search for Border child of the ChartArea:
var clipPanel = minuteChartData.DefaultView.ChartArea.FindChildByType<RadTransitionControl>();
var grid = clipPanel.FindChildByType<Grid>();
var border = grid.FindChildByType<Border>();
border.BorderBrush = new SolidColorBrush(Colors.Green);
border.BorderThickness = new Thickness(3);
}
Feel free to customize the BorderBrush Color or the BorderThickness as per your needs.
Best wishes,
Evgenia
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>