Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » bubble charts(setting the size of the bubbles)
icon5.gif  bubble charts [message #556916] Fri, 03 September 2010 03:58 Go to next message
No real name is currently offline No real name
Messages: 1
Registered: September 2010
Junior Member
The sizes of the bubbles are calculated and set automatically by birt
In many cases the sizes of all bubbles are too big, i want to have for example:
- a maximum size for all bubbles
- or multiply all bubble sizes with a factor for example with 0.3
- any other way that avoids extremely big bubbles overlapping many other bubbles.

I tried this script without success:

function beforeDrawDataPoint( dph, fill, icsc )
{
mybubbleval = dph.getOrthogonalValue();
if( mybubbleval.getClass().toString() == "class org.eclipse.birt.chart.datafeed.BubbleEntry") {
mybubbleval.setSize(1);
}
}

Many thank's for helping.
Re: bubble charts [message #557020 is a reply to message #556916] Fri, 03 September 2010 12:14 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

I believe the problem is that the size is already used before the
beforeDrawDataPoint event occurs. You may want to log a bug for this.
As a work around change it in a prior script. For example in the
afterComputations like:

function afterComputations( chart, plotComputation )
{
importPackage(Packages.java.lang);
var xAxis = chart.getAxes().get(0);
var yAxis = xAxis.getAssociatedAxes().get(0);
var xSerieDef = xAxis.getSeriesDefinitions().get(0);
var ySerieDef = yAxis.getSeriesDefinitions().get(0);
var ySerie = ySerieDef.getRunTimeSeries().get(0);
var dpa =
plotComputation.getSeriesRenderingHints(ySerieDef,ySerie).ge tDataPoints();
for( ii =0; ii<dpa.length; ii++ ){
var csize = dpa[ii].getOrthogonalValue().getSize();
dpa[ii].getOrthogonalValue().setSize( Double.parseDouble( csize)*.3);
}
}

Jason

On 9/3/2010 3:58 AM, manfred.drescher@finaware.ch wrote:
> The sizes of the bubbles are calculated and set automatically by birt
> In many cases the sizes of all bubbles are too big, i want to have for
> example:
> - a maximum size for all bubbles
> - or multiply all bubble sizes with a factor for example with 0.3
> - any other way that avoids extremely big bubbles overlapping many other
> bubbles.
>
> I tried this script without success:
>
> function beforeDrawDataPoint( dph, fill, icsc )
> {
> mybubbleval = dph.getOrthogonalValue(); if(
> mybubbleval.getClass().toString() == "class
> org.eclipse.birt.chart.datafeed.BubbleEntry") {
> mybubbleval.setSize(1);
> }
> }
>
> Many thank's for helping.


Jason Weathersby

BIRT Exchange
Previous Topic:open "Report design" perspective when open a ".rptDesign" file
Next Topic:Binding parameters in dataset
Goto Forum:
  


Current Time: Sat Apr 19 15:54:10 EDT 2014

Powered by FUDForum. Page generated in 0.01445 seconds