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.
精彩评论