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

Message ListMessage List     Post MessagePost Message

  OverRiding the DataSet
Posted by Maurice B on Jan-16-2013 06:17
Am currently using ChartDirector 5.1 with Visual C++ 10 and am using MFC.

My Application is currently using an array of ?long?s for the data, can I override the chart Control getData to iterate through a long array instead of a double array?

  Re: OverRiding the DataSet
Posted by Peter Kwan on Jan-17-2013 04:41
Hi Maurice,

As far as I know, there is no "getData" method in ChartDirector. Anyway, ChartDirector expects data to be "double" values. If you have long values, we suggest you to convert them to double values first, before passing the data to ChartDirector. For example:

//convert to double array
std::vector<double> temp(myArraySize);
for (int i = 0; i < myArraySize; ++i)
     temp[i] = (double)myLongArray[i];

c->addLineLayer(DoubleArray(&(temp[0]), myArraySize), .....);

Regards
Peter Kwan