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

Message ListMessage List     Post MessagePost Message

  Have 4 charts in one png. Want a date label at the top as well as the bottom of the charts
Posted by tom on Aug-02-2015 02:15
Attachments:
Hi,

I have 4 charts in one png.   The Date label is at the bottom of the 4th chart.   Is there any way to add a 2nd date
label at the top of the first chart?   Or at the bottom of each individual chart?


Thanks.
AAPL_252.png

  Re: Have 4 charts in one png. Want a date label at the top as well as the bottom of the charts
Posted by Peter Kwan on Aug-04-2015 01:22
Hi tom,

If you are using the FinanceChart object to create the 4 charts, then all 4 charts have the
same x-axis. However, each chart will make the x-axis of the previous chart transparent,
so you can only see the last x-axis.

If you want to have an x-axis at the top as well, may be you can use the following
method:

(a) When you add the first chart (the main price chart in your case), store the returned
XYChart object in a variable as you can use it later, For example, in C#/Java:

XYChart firstChart = c.addMainChart(.............);

(b) When you have finished adding the 4 charts, set the x-axis of the first chart to non-
transparent and move it to the top of chart:

firstChart.xAxis().setColors(Chart.Transparent, 0x000000);
firstChart.setXAxisOnTop();

Hope this can help.

Regards
Peter Kwan

  Re: Have 4 charts in one png. Want a date label at the top as well as the bottom of the charts
Posted by tom on Aug-04-2015 06:06
Peter,

I'm using the Perl version.  I figured it out based on you example.   Now I just have to figure out how to add
spacing between the chart Title and the X-Axis date label.

  Re: Have 4 charts in one png. Want a date label at the top as well as the bottom of the charts
Posted by Peter Kwan on Aug-05-2015 01:11
Hi Tom,

May be try to use FinanceChart.setMargins to increase the top margin. This should be done
immediately after creating the FinanceChart object and before adding the first chart (the
main price chart in your case). For example:

$c->setMargins(40, 60, 40, 40);

Hope this can help.

Regards
Peter Kwan