Hello,
i made a XamPieChart and a corresponding itemlegend:
<ig:ItemLegend x:Name="PieLegend" HorizontalAlignment="Right"
VerticalAlignment="Top" Margin="5,30,5,30" /> <ig:XamPieChart Legend="{Binding ElementName=PieLegend}" Name="pieChart"/>
In code-behind:
pieChart.LabelMemberPath = "Item" pieChart.ValueMemberPath = "Value" pieChart.ItemsSource = myData That works great. But what i want to do now is that the user can interact with the legend like he interacts with the piechart. For example: I made a slice explode when the user clicks on it and reverse. Public Shared Sub pieChart_SliceClick(sender As System.Object, e As Infragistics.Controls.Charts.SliceClickEventArgs) e.IsExploded = Not e.IsExploded End Sub Now i want the same action when the user clicks on the related Legenditem. A good start should be using the LegendItemMouseDown-event Private Shared Sub LegendItemMouseDown(sender As Object, e As DataChartLegendMouseButtonEventArgs) End Sub But when i debug and look into e.chart, it is Nothing. I expected my pieChart in there. Is it a bug or did i something wrong? P.S. Sorry for that awful formatting Sincerely, matti
pieChart.LabelMemberPath = "Item" pieChart.ValueMemberPath = "Value" pieChart.ItemsSource = myData
That works great. But what i want to do now is that the user can interact with the legend like he interacts with the piechart.
For example: I made a slice explode when the user clicks on it and reverse.
Public Shared Sub pieChart_SliceClick(sender As System.Object, e As Infragistics.Controls.Charts.SliceClickEventArgs) e.IsExploded = Not e.IsExploded End Sub Now i want the same action when the user clicks on the related Legenditem. A good start should be using the LegendItemMouseDown-event Private Shared Sub LegendItemMouseDown(sender As Object, e As DataChartLegendMouseButtonEventArgs) End Sub But when i debug and look into e.chart, it is Nothing. I expected my pieChart in there. Is it a bug or did i something wrong? P.S. Sorry for that awful formatting Sincerely, matti
Public Shared Sub pieChart_SliceClick(sender As System.Object, e As Infragistics.Controls.Charts.SliceClickEventArgs) e.IsExploded = Not e.IsExploded End Sub
Now i want the same action when the user clicks on the related Legenditem.
A good start should be using the LegendItemMouseDown-event
Private Shared Sub LegendItemMouseDown(sender As Object, e As DataChartLegendMouseButtonEventArgs) End Sub But when i debug and look into e.chart, it is Nothing. I expected my pieChart in there. Is it a bug or did i something wrong? P.S. Sorry for that awful formatting Sincerely, matti
Private Shared Sub LegendItemMouseDown(sender As Object, e As DataChartLegendMouseButtonEventArgs) End Sub
But when i debug and look into e.chart, it is Nothing. I expected my pieChart in there. Is it a bug or did i something wrong?
P.S. Sorry for that awful formatting
Sincerely,
matti
Hi Matti,
I'm in the process of building a sample to test your question. While I'm working on that could you please provide me with the specific product version and service release that you are using?
Hi Marianne,
Version is when i follow http://devcenter.infragistics.com/Support/ReleasedVersions.Aspx#HowToFindVersion
11.2.20112.2046