LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Charts

Hi Andy

Thanks for feedback. Have used your example and it certainly seems faster

code is now

With Cht
With ChtSeries
.HasDataLabels = True
Call SysCmd(acSysCmdInitMeter, "Adding " & .Points.Count & "
Labels", NoPoints)
For lCount = 1 To .Points.Count
.Points(lCount).DataLabel.Text =
CStr(SpaceAllocationSet!SpaceAndName)
If SpaceAllocationSet!LabelAngle < 0 Then
.Points(lCount).DataLabel.Orientation =
SpaceAllocationSet!LabelAngle
End If
DoEvents
SpaceAllocationSet.MoveNext
Call SysCmd(acSysCmdUpdateMeter, lCount)
Next lCount
End With
End With

Interestingly the counter at the bottom is almost instantaneous saying it
has added the 68 points. Adding the DoEvents shows each label as it is
added. Takes just under 20 seconds to label the 68 points. Without the
DoEvents nothing happens for 20 seconds, then all the labels appear at once.
Hiding the control makes no difference.

Seems like a delay in showing the information rather than doing it. Same
sort of routine in Excel is instantaneous. Why does the Access environment
slow things down so much?

Thanks

Phil


"Andy Pope" wrote in message
...
Hi,

Not sure if this will help but I posted some code on how to set the data
label text.
http://www.andypope.info/ngs/ng16.htm

The example is actually for coding MSGraph within PowerPoint but the
technique and coding should still work in in Access.


Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Phil Stanton" wrote in message
...
I appreciate that this is an Excel forum, and I am using a chart object in
Access, but probably I will be better off posting it to this newsgroup.

I am using a scatter chart on a form to show a map and points of interest
that I want labelled.

After a struggle I have loaded the map, loaded the point and from a
recordset, copied and pasted the label information into column 3 of the
chart's Datasheet.

Set DtaSheet = Cht.Application.DataSheet
For Each ChtLabel In ChtLabels
ChtLabel.Caption = DtaSheet.Cells(lCount + 2, 3)
lCount = lCount + 1
Next ChtLabel

This works OK but takes 20 seconds to label 68 points. I thought it might
be
quicker to do it this way rather than getting the label information
straight
from the recordset, but there is little difference in time.

What can I do to speed it up? Is there a way of loading all the labels at
once

Thanks

Phil






 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
link excel charts to web pages and update charts automatically Signguy Charts and Charting in Excel 1 April 22nd 08 08:29 PM
Copy/Paste Charts; Define Destination of Charts in PowerPoint ryguy7272 Excel Programming 2 January 24th 08 08:04 PM
Charts - How to have multiple charts share a legend. Sean Charts and Charting in Excel 2 November 20th 07 04:49 AM
interactive charts for stacked bar charts [email protected] Charts and Charting in Excel 4 December 28th 06 09:58 PM
Matching the colors Column Charts and Pie Charts RohanSewgobind Charts and Charting in Excel 3 April 21st 06 09:35 PM


All times are GMT +1. The time now is 09:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"