|
Inter-Line-Coloring |
Posted by Tobias Reu on Nov-28-2011 21:27 |
|
Hi Peter,
I'm filling the area between a line (yesterday-price) and a curve (close-price) with an InterLineLayer:
my $o_lineLayer = $o_financeChart->addCloseLine($perlchartdir::Transparent);
my $o_interLineLayer1 = $o_mainChart->addInterLineLayer(
$lineLayer->getLine(0), # close-line
$o_yesterdayMark->getLine(), # day-before-line
$colorDayBeforeDependendNegative,
$perlchartdir::Transparent,
);
my $o_interLineLayer2 = $o_mainChart->addInterLineLayer(
$lineLayer->getLine(0), # close-line
$o_yesterdayMark->getLine(), # day-before-line
$perlchartdir::Transparent,
$colorDayBeforeDependendPositive,
);
Now my question:
Is it possible to draw the border-line in different colors at the InterLineLayer?
My Idea was, to add 2 InterLineLayers (first with transparent, color negative; second with color positive, transparent) and set two different border-line-colors in each layer.
It tried to set the border-line-color with $o_interLineLayer1->setBorderColor(0x00FF00). But this method only applies to layers that represents data with shapes that have borders.
Next I tried to get the DataSet and set the color of the DataSet:
my $o_ds = $o_interLineLayer1->getDataSet(0);
$o_ds->setDataColor(0x00FF00);
This causes the error:
die in fcgisub: Error converting object pointer to type P7DataSet\\\\n*** Stack back trace ***\\\\ncalling DataSet.setLineWidth
Do you have any idea how to solve this problem?
Thanks in advance
Tobi
|
Re: Inter-Line-Coloring |
Posted by Tobias Reu on Nov-29-2011 01:17 |
|
I have the solution:
- first, I have to add a yZoneColor()
- second, this color I have to use for the LineLayer |
|