Hi Daniel M,
From my understanding, you would like to cut out some region in the InterLineLayer, such as punching hole in the InterLineLayer. While the InterLineLayer is non-transparent or semi-transparent, the hole will appear as completely transparent.
It would be easy if the hole is a non-rotated rectangle (that is, it borders are vertical and horizontal lines). This can be achieved using xZoneColor and yZoneColor.
For other cases, it may be quite complicated. The method I think of is, which is similar to how this type of things would be created with Photoshop.
(a) Create a separate chart image with just the hole in some special unique color not appearing in the InterLineLayer. Everything else (the background, grid lines, etc) must be transparent. This image is used as the "mask".
(b) Create yet another chart with just the InterLineLayer with everything else transparent. Merge the image in (a) onto the chart. The chart will then contain a hole with the unique color. Use BaseChart.setTransparentColor to configure the unique color as the transparent color. Save the chart in PNG (either to memory or as a file). The PNG will then contain your InterLineLayer with a transparent hole.
(c) Load the PNG, and merge it with your real chart. Your real chart will then contain an InterLineLayer with a hole in it.
Regards
Peter Kwan |