View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.charting
Jon Peltier Jon Peltier is offline
external usenet poster
 
Posts: 6,582
Default Excel Chart Series Values Property Size Limitation

It seems like it would be "nice" if you could bury chart data in the chart
formula, though it's much harder to edit in the formula, and harder to see
where something may be wrong. Using Names also seems like a "nice" solution,
but Names populated with static arrays also suffer from the above problems.

Excel charts were designed to work with worksheet data. Worksheets are
cheap, they are easy to edit and validate, and they can be hidden. If you
want to hide the data completely, sending a chart with data isn't secure, as
a simple macro can be used to extract the data. A more secure approach is to
make a picture copy of the chart: hole Shift, select the Edit menu, choose
Copy Picture, and use the Picture and On Screen options. Then select a cell
and paste.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Peter T" <peter_t@discussions wrote in message
...
Each 'segment' of the Series formula is limited to an absolute maximum of
255 characters (can be a bit less), incl curly brackets, commas and
values.
Depending on your data, rounding dp may help reduce the overall length
sufficiently.

Otherwise, one way to put large amounts of data into a series is with
'Name
arrays'. The limit in XL2000 is 5000+ points (much more in later
versions).
Cells are not required, indeed the workbook could contain only
chart-sheets.

If not, is
it possible to create an invisible range?


Of course, chart data could be in cells in hidden columns, outside the
ScrollArea, or on a hidden sheet (eg xlSheetVeryHidden).

Regards,
Peter T

"Pete" wrote in message
...
Hi,

I am trying to create a new series in an Excel chart using code (it's
actually VB.Net but I think it's almost identical in VBA). After creating

a
series using Series1 = Chart1.SeriesCollection.NewSeries, I am trying to

set
the values property of the series by assigning an array (in VB.Net this
is

an
array of Doubles) e.g. Series1.Values = DataArray1. For charts containing
many data points (30 depending on the size of the numbers), I get the

error
message "Unable to set the values property of the series class". I

understand
this is because there is a limit to the size of an array, or the values
definition string, that the Values property can accept. The data for the

new
series is not contained in a range within a Worksheet.

Is there a workaround that doesn't involve writing the data to the

worksheet
and setting the Values property to the range containing the data? If not,

is
it possible to create an invisible range? Alternatively, is there a way
of
dynamically adding datapoints to a series in a program loop so I can
gradually build up the array of data points without getting this error?
Is
there any other way to create a chart series from an array of numbers

without
hitting this size limit?

Thanks,

Pete