Jump to content
Software FX Community

Re: Array problem when creating a chart

User (Legacy)

Recommended Posts


Thank you for your help, but my code still isn't working.

This is what I do (using Javascript inside an ASP page):



var chart, Conn;

chart = Server.CreateObject("ChartFX.WebServer");

chart.Axis(AXIS_Y).Min = 900;

chart.Axis(AXIS_Y).STEP = 50;

chart.Axis(AXIS_Y).Format = "####,";

Conn = Server.CreateObject("myComObject.wsc"); // reference to my COM


var CfxArray;

CfxArray = Server.CreateObject("CfxData.Array");

var arVF = Conn.get_arFields(); // an array containing int fields

var arDags = Conn.get_arDates(); // an array containing dates



chart.DataType(0) = CDT_XVALUE;

chart.DataType(1) = CDT_VALUE;

chart.GetExternalData (CfxArray);

Conn = null;




Do you see what's wrong with it? It doesn't show any errors but just hangs

after I call the asp page.

Thank you,


"SteveT" <stephent@compassadv.com> wrote in message



Show some more code.

You say your array has numbers and dates? The AddArray will only take

single dimension arrays.

From the help file:

"However, you can not pass multidimensional arrays to Chart FX. This means,

if you create a matrix or a multidimensional array as nData(10,10) Chart FX

will not know how to process this information. An error will occur."

Here is their example:

'Create the Chart FX Data provider array

Dim CfxArray As CfxDataArray

'nValues and nLegend are previously filled arrays

Dim nValues(10) As Integer

Dim nLegend(10) As Variant

'Add the nValues and nLegend arrays to the data provider

CfxArray.AddArray nValues

CfxArray.AddArray nLegend

'Let Chart FX take the information from the data provider

ChartFX1.GetExternalData CfxArray


uba <unnur@kveikir.is> wrote in message


> Hi all,


> I'm having problems with creating a chart. I get an array from a com


> and I add it to the CfxArray. Then I try calling

> chart.GetExternalData(CfxArray) but nothing happens, it just seems to be

> looping - no error messages.

> Does anyone know why my chart is not appearing? My array contains numbers

> and dates so it shouldn't be a problem creating a chart out of it.


> Many thanks,


> uba





Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...