I have the need to programmatically change the background color of the plot area of a line chart in the Telerik 开发者_开发技巧RadChart control in a Silverlight 4 application. I also need to be able to change the size and visibility of the PointMarker on a line chart. I cannot figure out how to do either.
The closest I have gotten is changing the background color of the ChartArea, but that changed the background color of everything except the PlotArea.
All of the sample code I have found on the Telerik site that mentions PointMarker is for te ASP.NET RadChart. The programming model for that control seems very different.
Thanks, Jim
You can change the background color of the Plot Area with this implicit Style:
<telerik:RadChart x:Name="RadChart1">
<telerik:ChartArea>
<telerik:ChartArea.PlotAreaStyle>
<Style TargetType="telerik:ClipPanel">
<Setter Property="Background" Value="Yellow"/>
</Style>
</telerik:ChartArea.PlotAreaStyle>
</telerik:ChartArea>
</telerik:RadChart>
Take a look at this help topic where it is demonstrated together with a source code how to change the Visibility of the PointMarks for particular points.
精彩评论