Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » How to use script to reverse a chart axis of bubble chart(Bubble Chart axis reverse)
How to use script to reverse a chart axis of bubble chart [message #1456321] Thu, 30 October 2014 08:33 Go to next message
Ankur Kedia is currently offline Ankur KediaFriend
Messages: 1
Registered: October 2014
Junior Member
Hi,

I am new to the forum and BIRT so please pardon my lack of knowledge. I wanted to reverse a chart axis particularly y axis so that it displays from max to 0 . The chart is a bubble chart with y axis showing duration(in sec) and x axis is showing the metric "FCR". Also, the size of bubble is propotional to some other metric "volume" . Can you please help me out?
I followed the tutorial given in: birtworld.blogspot.in/2008/12/birt-reversing-chart-scale.html

However, I am encountering an error in this portion of the script:
function afterDataSetFilled(series, dataSet, icsc)
{
if( series.getSeriesIdentifier() == "series1"){
    var list = dataSet.getValues();
    for ( i=0; i < list.length; i=i+1)
    {  
        list[i] = gblscale - list[i];
    }
}
}


The error is : Cannot convert NaN to org.eclipse.birt.chart.extension.datafeed.BubbleEntry

Thanks in advance!

[Updated on: Thu, 30 October 2014 12:56] by Moderator

Report message to a moderator

Re: How to use script to reverse a chart axis of bubble chart [message #1462532 is a reply to message #1456321] Wed, 05 November 2014 17:27 Go to previous message
Graham Cottle is currently offline Graham CottleFriend
Messages: 3
Registered: November 2014
Junior Member
I believe the data values of a bubble chart are instances of:
org.eclipse.birt.chart.extension.datafeed.BubbleEntry

So you can't set the value like its done in the example:

list[i] = <value>;


You'll probably need to slightly rewrite this bit of code to set the size and value via the BubbleEntry methods e.g.:

myBubbleEntry = list[i];
myBubbleEntry.setSize( ... );
myBubbleEntry.setValue( ...);
... etc ...
Previous Topic:Chart with secondary axis
Next Topic:add different background in each page
Goto Forum:
  


Current Time: Thu Apr 25 13:43:29 GMT 2024

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

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

Back to the top