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

Message ListMessage List     Post MessagePost Message

  FinanceChart - dashLineColor
Posted by Rehan W on Oct-31-2008 11:04
Hi Peter,

Another question :) Im trying to display my grid lines as DotLine - but nothing appears? If
I just set it to the color its fine.

Sample code:

$c = new FinanceChart(600);

$c->setData(...);

$c->setPlotAreaStyle(0xffffff, $c->dashLineColor(0xcccccc, DotLine), $c-
>dashLineColor(0xcccccc, DotLine), Transparent, Transparent);

Appreciate it!

Thanks
Rehan

  Re: FinanceChart - dashLineColor
Posted by Rehan W on Oct-31-2008 12:16
Id also like to know how to set the FinanceChart Axis like in the XYChart.

I tried $c->xAxis-setColors(Transparent); but to no avail :(

the setLegendStyle also does not change the fontColor to what I set - is the default
black.

thanks,
rehan

  Re: FinanceChart - dashLineColor
Posted by Peter Kwan on Oct-31-2008 17:46
Hi Rehan,

The FinanceChart object is not really a chart, but a container for multiple charts (the price chart, and various technical indicator charts).

Currently, the grid line color is only valid on that chart that it is created. For example, if you need to use a grid line in the main price chart, you would need to create the grid line color using the main price chart object.

Because the FinanceChart API has not been designed with this possibility, you would need to go into the FinanceChart.php source code to perform the above step. (The "FinanceChart.php" is intended to be an example, that's why the source code is open, and its API is not as comprehensive as the core ChartDirector itself.)

You may go into the FinanceChart.php, find the line with "setGridColor". It should be like:

$plotAreaObj->setGridColor($this->m_majorHGridColor, $this->m_majorVGridColor,
    $this->m_minorHGridColor, $this->m_minorVGridColor);

Please change it to:

$plotAreaObj->setGridColor($ret->dashLineColor($this->m_majorHGridColor, DotLine), $ref->dashLineColor($this->m_majorVGridColor, DotLine), ......);

For the x-axis color, you may modify it for the main price chart like:

$myMainPriceChart = $c->addMainChart(.......);
$myMainPriceChart->xAxis-setColors(Transparent);

For the legend box, use:

$myLegendBox = $myMainPriceChart->getLegend();
.....

Similar approach can be used for indicator charts.

Hope this can help.

Regards
Peter Kwan

  Re: FinanceChart - dashLineColor
Posted by Rehan W on Nov-03-2008 10:55
Hi Peter - sorry for the late reply - thanks for the info :) it seems it might be better to
create a simple XY Multichart as I just need a simple closeLine and VolBars on a pale blue
bg :)

thanks again!