【问题标题】:MS Chart Control un-explode a pie pointMS Chart Control 取消分解饼图点
【发布时间】:2014-03-07 20:59:53
【问题描述】:

我正在尝试解除或内爆饼图中的爆炸点。
但是,当我炸开一个点时,它“知道”它已炸开,但它在图表上并没有这样显示。

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

我确实收到了“测试爆炸警报”,但此时饼图点并未在视觉上爆炸。
删除Series1.Points(pointIndex)("Exploded") = "False" 会使点在视觉上爆炸,但不会内爆/取消爆炸。

如何分解或取消分解已分解的饼图点?

【问题讨论】:

    标签: asp.net charts


    【解决方案1】:

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

    Chart1.Databind();
    Chart1.Series["Series1"].Points[0]["Exploded"] = "false";
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多