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

Message ListMessage List     Post MessagePost Message

  Background Colour
Posted by Adrian on Mar-31-2011 03:38
Hi,

I have a question regarding the background of the following chart :
http://www.advsofteng.com/images/softlightbar_g.png

In the description it states that to create that type of background in that particular plot area you need this code :

c.setPlotArea(60, 40, 500, 280, c.linearGradientColor(60, 40, 60, 280, 0xeeeeff,
    0x0000cc), -1, 0xffffff, 0xffffff);


My question is this, how can I add the "c.linearGradientColor" part at a later time instead of when setPlotArea() is called?

In other words first I want to set the plot area
"c.setPlotArea(60, 40, 500, 280)"
then later on in the code I want to add the c.linearGradientColor and I want it to appear the same way as the link example.


Any help would be appreciated.

  Re: Background Colour
Posted by Peter Kwan on Mar-31-2011 13:42
Hi Adrian,

You may use PlotArea.setBackground. For example:

PlotArea p = c.setPlotArea(60, 40, 500, 280, -1, -1, 0xffffff, 0xffffff);

... do some things ....

//Add the line below before the chart is drawn (before callng makeImage or makeSession or makeChart, ...)
p.setBackground(c.linearGradientColor(60, 40, 60, 280, 0xeeeeff, 0x0000cc));

Hope this can help.

Regards
Peter Kwan

  Re: Background Colour
Posted by Adrian on Apr-01-2011 05:11
That did it. Thanks for you help.