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

Message ListMessage List     Post MessagePost Message

  Area Chart with +ve and -ve Values
Posted by KS31890 on Jan-14-2011 05:50
Attachments:
How do I create this area chart (areas D and E have both +ve and -ve values) with Python? Thanks
area chart with negative.jpg
AssetLoadings.xls
AssetLoadings.xls

22.00 Kb

  Re: Area Chart with +ve and -ve Values
Posted by Peter Kwan on Jan-15-2011 02:04
Hi KS31890,

From what I know, the current area chart stacking method used by ChartDirector for bipolar data is the same as the stacking method used by Microsoft Excel, and is different from the stacking method shown in your message.

If you would like to use the stacking method in your message, you may consider to perform the followings:

(a) Split each data array into two data arrays, with one array containing the positive data only (with the negative positions replaced with zero), and one array consisting of the negative data only (with the positive positions replaced with zero).

(b) Plot the positive arrays as a stacked area layer.

(c) Plot the negative arrays as another stacked area layer.

Hope this can help.

Regards
Peter Kwan

  Re: Area Chart with +ve and -ve Values
Posted by KS31890 on Jan-15-2011 07:04
Would you please tell me what is the best way to fill different colors between the lines? Thanks

  Re: Area Chart with +ve and -ve Values
Posted by Peter Kwan on Jan-15-2011 10:56
Hi KS31890,

If you have computed the lines that represents the boundaries of the filled region, you may fill between the lines using an interline layer (addInterLineLayer). For example:

#fil the region between the lines for dataSet 0 of lineLayer1 and datSet 1 of lineLayer1 with red
c.addInterLineLayer(lineLayer1.getLine(0), lineLayer1.getLine(1), 0xff0000);

Hope this can help.

Regards
Peter Kwan

  Re: Area Chart with +ve and -ve Values
Posted by KS31890 on Jan-18-2011 12:49
Perfect. Thanks a lot