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

Message ListMessage List     Post MessagePost Message

  Contour chart with concave edges and holes
Posted by Josh Forare on Jun-09-2011 03:55
Attachments:
Is it possible to make a contour chart with (A) concave edges and (B) holes.  I saw a few
forum posts that led me down the path of the attached example where I define a Z value as
a transparent color.   The problem with this solution is that I cannot seem to stop the
interpolation to the transparent value.  See the hole and concave bottom in the attached
image(contour.JPG).  In this example blue represents the transparent color (z = -1).

See attachments
contour.JPG
TestContourChart.java

My goal is to produce a contour map of wind speeds for a variety of forecast models.  For
these cases the data is in a grid and some model shapes have concave edges.  Thanks for
your time and advice.


Other attachments
nam_forecast.JPG
  - This is a real example of the wind speeds from the NAM forecast model.  This is a model
that covers North America.  We want to stop the distortion created at the bottom of this
model.  The entire bottom of this model is a concave surface.  This chart has interpolated
and displayed values across the concave area.
contour.JPG
nam_forecast.JPG
TestContourChart.java
TestContourChart.java

6.15 Kb

  Re: Contour chart with concave edges and holes
Posted by Peter Kwan on Jun-10-2011 02:45
Hi Josh,

Yes. The easiest method is to simply cover the unwanted parts up with a "mask".

The "mask" can be an image prepared in advance, or it can be composed of shapes drawn by ChartDirector.

For example, for your case, if the bottom concave edge happens to be an arc, one method is to simply draw a large white circle at the bottom to cover up the part that you do not want. If you know the points along the concave edge, you can also ask ChartDirector to draw a white polygon.

For example:

.... create coutour chart as usual ....

DrawArea d = c.makeChart3();
d.circle(800, 800, 500, 500, 0xffffff, 0xffffff);

Note that the white circle above is simply, but it will block other things at the bottom of the chart, such as the x-axis labels. I suggest this method because in your case there does not seem to be anything at the bottom of the chart. There are other more precise methods (use a polygon, use a white bubble in a bubble layer, use a mask image, etc). If you need to use them, please let me know.

Hope this can help.

Regards
Peter Kwan