View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
septimus septimus is offline
external usenet poster
 
Posts: 20
Default Hiding 0 value data labels in chart

ABS,

Hey, that's great!!

Only problem is, I need the data labels to re-appear when the values
change to something greater than 0. If I delete the labels, they're
gone when the chart repaints with new data.

I tried changing the Text property instead of deleting the label
(i.e., If 0.0 Then DataLabel.Text = ""), but same problem: when the
values become larger the wiped labels are still empty.

Then I tried changing the font to white...

If
c.SeriesCollection(intSeries).Points(intPoint).Dat aLabel.Text = "0.0"
Then

c.SeriesCollection(intSeries).Points(intPoint).Dat aLabel.Font.ColorIndex
= 2
Else

c.SeriesCollection(intSeries).Points(intPoint).Dat aLabel.Font.ColorIndex
= 0
End If

.... and that works pretty well except that you can still glimpse some
white zeros at the bottom where they overlap with chart columns.

Any better ideas? How do I get the DataLabels back when data changes
(without closing the file)?