0

I'm trying to un-explode, or implode, an exploded point in a pie chart.
However, when I explode a point it 'knows' it is exploded, but it doesn't appear that way on the chart.

Protected Sub Chart2_Click(sender As Object, e As ImageMapEventArgs) Handles Chart2.Click


    Dim pointIndex As Int32 = Int32.Parse(e.PostBackValue)

    If pointIndex >= 0 & pointIndex < Series1.Points.Count Then
        If Series1.Points(pointIndex)("Exploded") = "True" Then
            Series1.Points(pointIndex)("Exploded") = "False"
            Series1.Points(pointIndex).MapAreaAttributes += "onclick=""alert('Test explode alert');"""
        Else
            Series1.Points(pointIndex)("Exploded") = "True"
        End If
    End If

End Sub

I do get the 'Test explode alert', but the pie point isn't visually exploded at that moment.
Removing the Series1.Points(pointIndex)("Exploded") = "False" makes the points visually exploded, but does not implode/un-explode them.

How can I implode or un-explode an exploded pie point?

4

1 回答 1

0

我不知道这是否会对您有所帮助,但在将“爆炸”点变为错误之前尝试对图表进行数据绑定。如下例所示:

Chart1.Databind();
Chart1.Series["Series1"].Points[0]["Exploded"] = "false";
于 2014-03-07T12:43:24.737 回答