|
xZoneColor and yZoneColor combined in one layer |
Posted by Harald Schellander on Mar-15-2010 18:05 |
|
Hi everybody
I am wondering how to combine the methods xZoneColor and yZoneColor in a single layer.
Using the following perl code I get a line which switches from blue to red at y-value 0, and
switches to a dashed line at x-value 5 (see attachment).
my $zoneColor = $layer->yZoneColor(0,$blue,$red});
my $dashColor = $layer->xZoneColor(5,$zoneColor,$c->dashLineColor(0x000000,
0x000505));
$layer->addDataSet($ref,$dashColor);
$layer->addDataSet($ref,$zoneColor);
What i really want is the dashed line to appear red and blue dashed and not red/blue and
black dashed.
How can I accomplish that?
|
Re: xZoneColor and yZoneColor combined in one layer |
Posted by Peter Kwan on Mar-16-2010 01:21 |
|
Hi Harald,
You may try:
my $zoneColor = $layer->yZoneColor(0,$blue,$red});
my $dashColor = $layer->xZoneColor(5,$zoneColor,$c->dashLineColor($zoneColor,
0x000505));
$layer->addDataSet($ref,$dashColor);
Note:
1. The dashLineColor should use $zoneColor as the base color, not 0x000000 (black).
2. You only need to call addDataSet once, using the final $dashLineColor (which is actually an xZoneColor including both the solid yZoneColor and the dashed yZoneColor).
Hope this can help.
Regards
Peter Kwan |
Re: xZoneColor and yZoneColor combined in one layer |
Posted by Harald Schellander on Mar-16-2010 14:20 |
|
Hi Peter
many thanks for your quick and useful reply. I always used addDataSet twice, that was the
problem.
Thanks, best regards
Harald |
|