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

Message ListMessage List     Post MessagePost Message

  Finance Chart Y-Axis Label
Posted by Stuy on Mar-21-2014 13:58
Attachments:
How can create the yellow label in the screenshot so that it will be shown on the top layer
of the axis?
Screen Shot 2014-03-21 at 1.53.10 AM.png

  Re: Finance Chart Y-Axis Label
Posted by Stuy on Mar-21-2014 13:59
I just wanted to add that I am using the PHP version of ChartDir.

  Re: Finance Chart Y-Axis Label
Posted by Peter Kwan on Mar-22-2014 00:43
Hi Stuy,

You may use Axis.addMark on the main price chart.

When you create a financial chart using FinanceChart, you need to use addMainChart to
add the main price chart. You can save the returned XYChart object to a variable, so you
can use it to add the mark. It is like:

$myXYChart = $myFinanceChart->addMainChart(.......);

$mark = $myXYChart->yAxis->addMark($myLastClosingPrice, -1, $myLastClosingPrice,
"Arial", 8);
$mark->setMarkColor(Transparent, 0x000000, Transparent);
$mark->setBackground(0xffff00, 0xffff00);

Hope this can help.

Regards
Peter Kwan

  Re: Finance Chart Y-Axis Label
Posted by Stuy on Mar-22-2014 03:39
Thank you so much Peter!

  Re: Finance Chart Y-Axis Label
Posted by Stuy on Mar-22-2014 05:16
Attachments:
Hi Peter,

How can I increase the width of Y-axis so that the label won't get cut off?
Screen Shot 2014-03-21 at 5.03.46 PM.png

  Re: Finance Chart Y-Axis Label
Posted by Peter Kwan on Mar-25-2014 03:27
Hi Stuy,

You may use FinanceChart.setMargins. For example:

$c->setMargins(50, 30, 50, 35);

Hope this can help.

Regards
Peter Kwan