Charting Arrays

B

boyze

I am trying to xy scatter plot with pre-defined arrays. A sampling of the
code is below but it does not recognize the arrays. Please advise.

Thanks in advance.

Dim Shear() As Double, NodeCoordinates() As Double
Dim MyNewSrs1 As Series
Set MyNewSrs1 = ActiveChart.SeriesCollection.NewSeries
With MyNewSrs1
.Name = Shear
.Values = Shear
.XValues = NodeCoordinates
End With
 
J

Jon Peltier

Have your arrays been populated?

Note that the data properties of the series are limited in how many
characters you can use to define them. If you have long numbers (remember
that most non-whole numbers may take up to 16 characters), the number of
points you can describe within this limitation may be much smaller than you
expect. Here's an article about this issue:

http://peltiertech.com/Excel/ChartsHowTo/DelinkChartData.html

The best approach is to dump the arrays into worksheet ranges, and chart
these ranges.

- Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top