Reputation: 905
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)
{
if (val == 0)
dp.IsValueShownAsLabel = false;
}
}
}
}
But as the chart is inside an ItemTemplate does not work. How can I do?
Upvotes: 1
Views: 1654