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

Message ListMessage List     Post MessagePost Message

  XY Chart Set color for AreaLayer
Posted by Nguyen Khang on Mar-27-2012 18:05
Hi all,

How can I set color for AreaLayer from 'pos 1' to 'pos 2' like as function
Axis.addZone(double startValue, double endValue, int color)

Thank!

  Re: XY Chart Set color for AreaLayer
Posted by Peter Kwan on Mar-27-2012 23:24
Hi Nguyen,

You may use a y-zone color or x-zone color as the area color. For example, in Java/C#:

int myColor = c.yZoneColor(startValue, Chart.Transparent, c.yZoneColor(endValue, 0x9999ff, Chart.Transparent));

c.addAreaLayer(myData, myColor, ...);

Hope this can help.

Regards
Peter Kwan

  Re: XY Chart Set color for AreaLayer
Posted by Nguyen Khang on Mar-28-2012 09:56
Attachments:
Thank for your reply, but it still not working

my code:

c.xAxis().addZone(150, 240, unchecked((int)0x00FDEDDF));
c.addAreaLayer(Data, unchecked((int)0x9976C676)).setBorderColor(Chart.Transparent);

result is picture 2, the Zone color under Area color

but I want result like picture 1, the Zone color above Area color
cafef.JPG
vdse.JPG

  Re: XY Chart Set color for AreaLayer
Posted by Nguyen Khang on Mar-28-2012 10:49
It working now

c.addAreaLayer(this.CloseData, c.xZoneColor(pos2, unchecked((int)0x99E47C7C), c.xZoneColor(pos3, Chart.Transparent, unchecked((int)0x9976C676))));


Thank!