Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » bubble charts(setting the size of the bubbles)
icon5.gif  bubble charts [message #556916] Fri, 03 September 2010 07:58 Go to next message
No real name is currently offline No real nameFriend
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 16:14 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
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.
Previous Topic:open "Report design" perspective when open a ".rptDesign" file
Next Topic:Binding parameters in dataset
Goto Forum:
  


Current Time: Tue Mar 19 05:05:42 GMT 2024

Powered by FUDForum. Page generated in 0.02607 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top