|
Re: BIRT Water Fall Chart [message #707376 is a reply to message #707162] |
Mon, 01 August 2011 15:16 |
|
Are you just wanting to store the previous value from the same series or
a different series?
If it is the same series you could use something like this in the chart
script:
var last=null;
function beforeDrawDataPoint( dph, fill, icsc )
{
if( last != null ){
if( last > dph.getOrthogonalValue() ){
fill.set( 255,0,0);
}
if( last < dph.getOrthogonalValue() ){
fill.set( 0,255,0);
}
}
last =dph.getOrthogonalValue();
}
Jason
On 8/1/2011 6:06 AM, vandhanaa.r wrote:
> I am new to birt ,I have formed Water fall chart from stacked charts .I
> need help on how to change color of series based on the previous series
> value. Where to do the scripting .Based on that want to denote if it is
> raise or fall of value. In this i need to know how can i retrieve the
> previous values of series and use the same.
> Using BIRT 2.2 - > Runtime
>
> Thanks In advance
|
|
|
|
Re: BIRT Water Fall Chart [message #707448 is a reply to message #707431] |
Mon, 01 August 2011 17:07 |
|
Any chance you could build a small sample report with the chart that
uses the sample db or a scriptdatasource and post it?
Jason
On 8/1/2011 12:44 PM, vandhanaa.r wrote:
> Jason,
>
> As you know in waterfall chart we hide series 1 and show series 2 so
> that it gives a floating effect. Series 2 is computed series Say for
> Example
> Data Series1 Series2 A 50 0
> B 60 increased by 10 C 65 inc by from the prev value
> D 40 decreased by 25
>
> The increase and decrease has to be shown in a diff color.
>
> So, basically i wanted to change the color based on comparing previous
> series value of the same series and the associated series.
>
> Thanks In Advance!!
>
>
>
>
>
|
|
|
|
Re: BIRT Water Fall Chart [message #708194 is a reply to message #707512] |
Tue, 02 August 2011 14:56 |
vandhanaa.r Messages: 18 Registered: July 2011 |
Junior Member |
|
|
Thanks a Lot Jason with your Help i could do it.
Now based on whether the below bar is red / green have to set the legend. Is that possible to do thaat in beforeDrawLegendEntry()
If suppose there is an increase of data with respect to the previous series by water fall standards we represent with a different color and the rise in different color.
[Updated on: Tue, 02 August 2011 15:00] Report message to a moderator
|
|
|
Re: BIRT Water Fall Chart [message #708256 is a reply to message #708194] |
Tue, 02 August 2011 16:03 |
|
In the example you sent me if I turn on the legend it only shows one
value, so I am not certain what you need. You can change the color of a
legend entry but if you only have one I am not certain how this is
helpful. You can color by categories to get more entries in the legend
but that will conflict with your waterfall.
Jason
On 8/2/2011 10:56 AM, vandhanaa.r wrote:
> Thanks a Lot Jason with your Help i could do it.
> Now based on whether the below bar is red / green have to set the legend. Is that possible to do thaat in beforeDrawLegendEntry()
>
> If suppose there is an increase of data with respect to the previous series by water fall standards we represent with a different color and the rise in different color.
|
|
|
|
Re: BIRT Water Fall Chart [message #708295 is a reply to message #708258] |
Tue, 02 August 2011 16:49 |
|
If you were using a later version of BIRT you could change it to color
by categories and use a script like:
function beforeDrawLegendItem( lerh, bounds, icsc )
{
idx = lerh.getDataIndex();
if( idx > 0 ){
if( list[idx] >= list[idx-1] ){
lerh.getFill().set( 0,255,0);
}else{
lerh.getFill().set( 255,0,0);
}
}
}
BIRT 2.1.2 does not support changing the fill on the legend.
You may be able to change the palette but I am not certain if it would
be to late in the code.
Jason
On 8/2/2011 12:08 PM, vandhanaa.r wrote:
> Will Take your points and work on it
> But , Jason as you say that is the problem i am facing If I change Legend according to catogery it conflicts with waterfall chart.
> So i could not give a legend depicting red is fall in data , green is rise in data in below rpt.
>
>
|
|
|
|
Re: BIRT Water Fall Chart [message #708381 is a reply to message #708304] |
Tue, 02 August 2011 18:05 |
|
I do not have 2.2.0, but it works in 2.2.2.
See attached.
Jason
On 8/2/2011 1:01 PM, vandhanaa.r wrote:
> I am using Birt 2.2 Runtime.I cannot upgrade BIRTS as i have some
> compatibility issues with the Eclipse and WAS server.IS it possible in
> BIRT 2.2 ?
>
>
|
|
|
|
Re: BIRT Water Fall Chart [message #713642 is a reply to message #711492] |
Mon, 08 August 2011 16:50 |
|
3.7 should work in WAS but I do not know about RAD.
Jason
On 8/6/2011 3:50 AM, vandhanaa.r wrote:
> Jason ,
> Just now checked the post, The designer version i am using is 2.1.3
> and the BIRT Runtime is 2.2.0.
> So , i am unable to view the script changes pertaining to
> beforeDrawLegendItem in the BIRT Viewer i will check in the runtime.
>
>
> Also wish to know the Latest Birt 3.7 version compatibility with RAD and
> WAS server.
>
|
|
|
Powered by
FUDForum. Page generated in 0.02507 seconds