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

Message ListMessage List     Post MessagePost Message

  function 'chartTime2' not found or invalid function name
Posted by Vart on Apr-02-2014 03:20
Hello, I use financial chart
I week ago I got problems with year labels, it prints 0046 and 0047 instead of 2013 and 2014. I replace
//      $timeStamps = array_keys($data);
to
$timeStamps = array_map('chartTime2', array_keys($data));

....
$FC->setData($timeStamps, null, null, null, $closeData, null, null);

but received error
Warning: array_map() expects parameter 1 to be a valid callback, function 'chartTime2' not found or invalid function name in /xxxxx/Charts.php on line 23

I print graphics in loop, error is only first time. First chart is bad. If I delete quotes, I received error and wrong chart each time
$timeStamps = array_map(chartTime2, array_keys($data));

I used php 5.5 and latest phpchardir module

it is used here: http://oscreener.com/options_screener/Bull_Put_Spread/view/charts/page/1/sort

  Re: function 'chartTime2' not found or invalid function name
Posted by Peter Kwan on Apr-02-2014 23:58
Hi Vart,

The chartTime2 is a ChartDirector function. Have you included "phpchartdir.php" before
executing array_map('chartTime2', array_keys($data))?

Regards
Peter Kwan

  Re: function 'chartTime2' not found or invalid function name
Posted by Vart on Apr-09-2014 05:45
Thank you!