开发者

how do I not show the value zero in the chart

asp.net + c#

I have a chart within a ItemTemplate how do I not show the value zero in the graph for this case?

I did

 protected void Chart1_DataBound(object sender, EventArgs e)
        {
           foreach (Series s in Chart1.Series)
            {
                foreach (DataPoint dp in s.Points)
                {
                    foreach (double val in dp.YValues)
                开发者_StackOverflow中文版    {
                        if (val == 0)
                            dp.IsValueShownAsLabel = false;
                    }
                }
            }
        }

But as the chart is inside an ItemTemplate does not work. How can I do?


Take a look at the discussions here, here and here. They have a lot of information on this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜