Format Data labels or Axis values based on the value


Posted by Aaron Hannon on November 13, 2001 1:34 AM

I am trying find a way withiout adding another series to the bar graph, of adding a data label or formatting the asix category of specific data points based on the value. What I want o achieve is marking pay Days and subsequesnt days on charts that change everymonth. So inserting a text box or drawing item isnt really that flerxible. Any help is greatly apperciated.



Posted by Damon Ostrander on November 13, 2001 9:43 AM

Hi Aaron,

The labels on data points can be set from within VBA to either the point's x-axis value, y-axis value, or any text string you desire, such as "Payday". In addition, the fonts in these labels can be individually set in size, color, Bold, etc., from within VBA based on the value of that point. Unfortunately I don't have time right now to provide some sample code, but I hope the mere assurance that it CAN be done will provide some encouragement to investigate it.

Regarding marking points on the axes, I believe that you would have to fall back on TextBoxes or other Shape (drawing) objects. But contrary to popular belief, it is possible in VBA to link the positions of drawing objects to values on the axes. If you want an example of this, I believe I have one I could send you.

Damon