Archive of Mr Excel Message Board

Check out Bill's new book on Charts and
Graphs for Microsoft Office Excel 2007
Back to Charting for Excel archive index
Back to archive home

attaching comments to data points in a chart
Posted by Al on January 19, 2002 6:33 AM
I have constructed a simple line graph which plots a rolling (dynamic) range of data points. Is there any way to attach comments or text to any particular data point right on the chart itself? I know I can place a comment on the cell within the data series but I'm wondering if it is possible to attach a comment to a point right on the chart. Ideally, you rest your cursor on the particular data point and a comment pops up!
Thanks for your help.
Al

Re: attaching comments to data points in a chart
Posted by Bariloche on January 19, 2002 11:28 AM
Al,
See if the Add-in available here solves your problem.
enjoy

Re: attaching comments to data points in a chart
Posted by Damon Ostrander on January 19, 2002 11:33 AM
Hi Al,
Data points in a chart series each can have a DataLabel object associated with them. You can assign text to this datalabel via the Text or the Caption property. Here's an example straight out of the VBA helps:
With Charts("chart1")
With .SeriesCollection(1).Points(2)
.HasDataLabel = True
.DataLabel.Text = "Saturday"
End With
End With
I don't believe there is a property such as Visible that allows you to turn on or off a particular label, but you can turn them all on or off with the Series object's HasDataLabels property.
I hope this helps.
Damon

This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our
online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.