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

Message ListMessage List     Post MessagePost Message

  Interline coloring between splines
Posted by Jim Johnson on Mar-30-2025 01:26
Attachments:
Greetings Peter -

  Quick question.  I have tried AddZone and c.addInterLineLayer to color the area between spline layer 1 (Max values) and spline layer 2 (Min values) so the latter is always > than the former.  I know this must be relatively easy but not having any luck getting it to work.

I am attaching a typical chart which has Max, Avg and Min.  What I would like is for the Max and Min to just be a pointless zone and show the points on the Avg - this will make the chart easier for users to view.

Thank you Peter for your time, you've been a great help over the years.

Jim Johnson
Gainesville, FL, USA
MaxMinZone.jpg

  Re: Interline coloring between splines
Posted by Peter Kwan on Mar-31-2025 14:15
Hi Jim,

You can use c.addInterLineLayer. The followings are some examples:

https://www.advsofteng.com/doc/cdnet.htm#linefill.htm
https://www.advsofteng.com/doc/cdnet.htm#linecompare.htm

For your case, if the two spline curves are from two different spline layers, you can use:

c.addInterLineLayer(splineLayer1.getLine(), splineLayer2.getLine(), &HCF33FF33)

If the two spline curves are different data sets for the same splineLayer, you can use:

c.addInterLineLayer(splineLayer.getLine(0), splineLayer.getLine(1), &HCF33FF33)

For example, consider the "Spline Line Chart" sample code:

https://www.advsofteng.com/doc/cdnet.htm#splineline.htm

In the above code, the two splines come from the same spline layer, so the code to fill the region in between is:

c.addInterLineLayer(layer.getLine(0), layer.getLine(1), &HCF33FF33)

Hope this can help.

Regards
Peter Kwan

  Re: Interline coloring between splines
Posted by Jim Johnson on Mar-31-2025 23:01
Attachments:
Peter -

  Resulting chart.  Thanks for the help Peter.

Jim Johnson
Auburn, AL, USA
DOAvg.png