ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  how to use setDataSymbol
Posted by Ryan on Jan-14-2012 01:42
I see in your samples that you always tend to use setDataSymbol at the same time you are passing in the dataset as in

Call layer1.addDataSet(data1, &H00ff00, "Atom Synthesizer").setDataSymbol( _
    cd.GlassSphere2Shape, 11)

but I have the following:

Set layer1 = c.addLineLayer(dataY1, &H00ff00, ReportTitle)
and using setDataSymbol does not work with this, as in:
Set layer1 = c.addLineLayer(dataY1, &H00ff00, ReportTitle).setDataSymbol(cd.GlassSphereShape, 2, -1, -1, 1)

so I tried:
Call layer1.setDataSymbol(cd.GlassSphereShape, 2, -1, -1, 1)

the ASP error I get is:
Object doesn't support this property or method: 'layer1.setDataSymbol'


and this does not work either.  So how to you set the DataSymbol separately from setting the DataSet/Array?

Thanks
-=Ryan

  Re: how to use setDataSymbol
Posted by Peter Kwan on Jan-14-2012 04:18
Hi Ryan,

You can use:

Call layer1.getDataSet(0).).setDataSymbol(cd.GlassSphereShape, 11)

Hope this can help.

Regards
Peter Kwan

  Re: how to use setDataSymbol
Posted by Ryan on Jan-14-2012 05:46
Yes, that helps. Thanks.

However, when I pass my array variable dataY1 to addLineLayer(dataY1, color, title)
I am getting a Error converting argument 1 to type class DoubleArray

However if I do the following:

response.write isArray(dataY1) & " "
response.write UBound(dataY1) & " "
response.write dataY1(0)

it writes:

True 1 23

so vbscript considers dataY1 an Array with one element, but ChartDirector seems to think it is not an array.  So can CD not handle arrays with only one element?

Thanks
-=Ryan

  Re: how to use setDataSymbol
Posted by Peter Kwan on Jan-15-2012 23:38
Hi Ryan,

According to your information, I believe vbscript considers dataY1 to be an Array with two elements, not one element. It is because UBound(dataY1) = 1, it means the array has two elements (with index 0 and 1). If you have never used the second element, it is uninitialized and vbscript may not consider it as a number. Consequently, dataY1 is not an array of numbers (only the first element is a number, but the second element is not a number).

To solve the problem, if dataY1 contains only 1 element, please declare it with the upper bound index of 0, like:

Dim dataY1(0)

Hope this can help.

Regards
Peter Kwan