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

Message ListMessage List     Post MessagePost Message

  PERL: I cannot access the array after using Surface Chart's xAxis->getTicks()
Posted by Paul M on Jul-10-2013 23:20
I am using the Surface Chart Axis Type graph
I want to overlay bars at the bottom of the graph that are relative to the x Axis position.
I do not know how to use the GetDrawArea option.
I tried getting the min and max ticks but the values returned are 0 and 100 yet my autoscaled range is from 1,500,000 to 1,900,000.
So I tried using GetTicks and get nothing in return.

Here are a few of my setups of the graph.

my $c = new SurfaceChart(1060, 900);
$c->setData($dataX, undef, $dataZ);
$c->yAxis()->setLabels($dataY);
The graph looks great and comes out as intented.
Below is the GetTicks() I used (taken from another post)

$xlabels = $c->xAxis()->getTicks();
for($i=0; $i<=$#$xlabels; $i++){
  $hr = $$xlabels[$i];
  print STDERR "$hr\\n";
}

Any help would be greatly appreciated.

  Re: PERL: I cannot access the array after using Surface Chart's xAxis->getTicks()
Posted by Peter Kwan on Jul-11-2013 00:12
Hi Paul,

As according to the ChartDirector documentation on Axis.getTicks, it should be called only after calling BaseChart.layout. Have you called BaseChart.layout first?

$c->layout();

Regards
Peter Kwan

  Re: PERL: I cannot access the array after using Surface Chart's xAxis->getTicks()
Posted by Paul M on Jul-11-2013 00:19
Peter Kwan wrote:

Hi Paul,

As according to the ChartDirector documentation on Axis.getTicks, it should be called only after calling BaseChart.layout. Have you called BaseChart.layout first?

$c->layout();

Regards
Peter Kwan

My God!  I banged my head all day yesterday trying to figure this out!  if I would have know to get a reply within minutes of posting....

It works PERFECTLY now after added $c->layout();  I missed that nuance.
you are a wizard!
thank you