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

How to apply RadContextMenu on Stacked Area Chart 2D.

2 Answers 48 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Manishkumar
Top achievements
Rank 1
Manishkumar asked on 12 Jan 2011, 01:46 PM
Hi,
I have to develop a Stacked area chart which can contain atmost of 15 areas, and on click of every stacked area, I  need to open different context menu.

I found an example for ContextMenu for Bar Chart, but when I changed the BarSeriesDefinition to StackedAreaSeriesDefinition and Style TargetType from telerik:Bar to telerik:StackedArea, it does not worked.

So, Could you please give me an example explaining how to implement ContextMenu on StackedArea.

2 Answers, 1 is accepted

Sort by
0
Accepted
Evgenia
Telerik team
answered on 17 Jan 2011, 04:44 PM
Hello Manishkumar,

The default template for the Chart differs according to the Chart 's Target Type. This means that you can't use the default Style of the Bar for StackedArea. This is the default template of the StackedArea:
<Style
        TargetType="telerikCharting:StackedArea">
        <Setter Property="Template" >
            <Setter.Value>
                <ControlTemplate TargetType="telerikCharting:StackedArea">
                    <Canvas>
                        <Rectangle x:Name="PART_AreaRectangle"
                       Height="{TemplateBinding ItemActualHeight}" 
                       Width="{TemplateBinding ItemActualWidth}"
                       Fill="Transparent"
                            <telerikCharting:PointMark x:Name="PART_PointMark"
                                                       Canvas.Top="{TemplateBinding StartPointY}"
                                                       PointMarkCanvasLeft="{TemplateBinding PointMarkCanvasLeft}"
                                                       PointMarkCanvasTop="{TemplateBinding PointMarkCanvasTop}"
                                                       Visibility="{TemplateBinding PointMarkVisibility}"
                                                       ShapeStyle="{TemplateBinding PointMarkShapeStyle}" 
                                                       Style="{TemplateBinding PointMarkItemStyle}" />
                    </Canvas>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

To be able to integrate it with RadContextMenu you can follow our help topic - http://www.telerik.com/help/silverlight/radchart-howto-integration-radcontextmenu.html

Best wishes,
Evgenia
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Manishkumar
Top achievements
Rank 1
answered on 18 Jan 2011, 11:06 AM
It worked,
Thanks a Lot.

Tags
General Discussions
Asked by
Manishkumar
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Manishkumar
Top achievements
Rank 1
Share this question
or