Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Newbie - Reading in data basics
Newbie - Reading in data basics [message #1614541] Fri, 13 February 2015 10:05 Go to next message
Jim Seconde is currently offline Jim SecondeFriend
Messages: 19
Registered: February 2015
Junior Member
Hi all, first post so I'll try and explain things as clearly as possible. These are likely to be very simple problems that I've encountered (I hope!)

I'm trying to output a line chart with data like the following:

Month Value
01/01/2014 154484
01/02/2014 165878
01/03/2014 897987
01/04/2014 456434

Data connection is an Excel spreadsheet.

The problem I'm having is with formatting the value in the dataset -
The chart will read the data in, no problem. But, I need the numerical value to be formatted as 0.0,
So, the chart reads in the data (and changes it's axis scale accordingly) like so:

Month Value
01/01/2014 154.5
01/02/2014 165.9
01/03/2014 898.0
01/04/2014 456.4

I've tried multiple ways to get this in, none have worked.

My first question is, shall I change the bindings in the dataset itself to read in as an Integer or a Decimal/Float? It's technically a number changing from one to the other. Or do I read in as Integer at dataset level and change the bindings in the chart to Decimal/Float as part of the formatting?

The second question is, when I changed the data so as to force in the decimal values, Eclipse still wouldn't read the values in as Decimals: The data binding was the same in the dataset and the chart bindings. Any pointers as to why it wouldn't read in decimals at all? (Probably more info required to answer this I expect)

What I'd like ideally is it reads in the original number and formats it accordingly on the fly through either the dataset or the chart. I've tried using Formatter.format in the Axis of the chart itself and at binding levels of the chart and dataset and there's no change in the graph.

Thanks in advance to anyone that can help or respond!
Re: Newbie - Reading in data basics [message #1614895 is a reply to message #1614541] Fri, 13 February 2015 15:15 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
Is this question related to BIRT?
Re: Newbie - Reading in data basics [message #1614959 is a reply to message #1614895] Fri, 13 February 2015 16:06 Go to previous messageGo to next message
Jim Seconde is currently offline Jim SecondeFriend
Messages: 19
Registered: February 2015
Junior Member
Hi,

It is, yes. I didn't see a sub-forum for BIRT only related questions...?
Re: Newbie - Reading in data basics [message #1614966 is a reply to message #1614959] Fri, 13 February 2015 16:12 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
The BIRT forum is under the Eclipse Projects "group." I'll move this topic to there.
Re: Newbie - Reading in data basics [message #1622410 is a reply to message #1614541] Wed, 18 February 2015 13:26 Go to previous messageGo to next message
Jim Seconde is currently offline Jim SecondeFriend
Messages: 19
Registered: February 2015
Junior Member
OK, so I know that the word "newbie" is in the thread title, but is absolutely nobody willing to give even the smallest pointer?

I mean, at the moment the indication is that highlighting some cells in Excel, creating a chart from it and choosing the number format as 0.0, is actually easy and takes all of 25 seconds to achieve...but BIRT Eclipse is seemingly not able to do this.

That's clearly not the case, but I'm finding no clues online whatsoever.

I've again tried using JavaScript formatting functions at binding level in the chart which doesn't work, and then at the axis level which doesn't work either.
Re: Newbie - Reading in data basics [message #1622789 is a reply to message #1622410] Wed, 18 February 2015 18:57 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Sorry, questions with multiple responses typically get skipped over by most that are looking for posts to respond to. At a glance, it looks like someone is already helping you.

So, you have a 6 digit integer that you want to read in and move the decimal over 3 places and round those three to the nearest 10th?

Or are you just trying to represent the 6 figure number with ###.#k?

Close to the same issue, I guess, but I'm just wondering. Let me know if I'm misunderstanding something.


Michael

Developer Evangelist, Silanis
Re: Newbie - Reading in data basics [message #1625248 is a reply to message #1622789] Fri, 20 February 2015 08:44 Go to previous messageGo to next message
Jim Seconde is currently offline Jim SecondeFriend
Messages: 19
Registered: February 2015
Junior Member
Hi, thanks for responding, It makes sense that people think there's already responses. I probably should have spotted the BIRT project section of the forum in the first place!

It's not necessarily a six digit integer that I'm trying to format- it could be more, and the input number could be a decimal too.

Just so anyone can understand why I'm doing what I'm doing - there are two charts....one is a number representing records received and the other is a monetary value. So, scaling the chart- I wouldn't want 76, 359 represented on a chart, but 76.3, the chart labelled as (in 000's). Similarly the monetary value is even higher, so would be represented as in millions...
1342666 would be 1.3m and so on.

I know it's going to be a called Java object at binding level....I just can't get a result or work out which binding level!

Thanks.
Re: Newbie - Reading in data basics [message #1626128 is a reply to message #1614541] Fri, 20 February 2015 21:04 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

The easiest way to get your axis value to look how you want is to go into the chart editor, select the format chart tab, go to the y-axis section, and click on format. Here, you can set a multiple and a suffix to get your axis label to display in the format of #.#K or #.#M. See the attached image.

index.php/fa/20949/0/


Michael

Developer Evangelist, Silanis
Re: Newbie - Reading in data basics [message #1630621 is a reply to message #1626128] Mon, 23 February 2015 09:40 Go to previous messageGo to next message
Jim Seconde is currently offline Jim SecondeFriend
Messages: 19
Registered: February 2015
Junior Member
Thanks Michael, I'll give that a try today. As I've looked at it at the axis level before, I'm pretty sure I was putting for format in incorrectly; a BIRT World forum post seemed to indicated that "0.0," would be a valid format but it looks like the digit indicator has to be a # and not 0.
Re: Newbie - Reading in data basics [message #1630843 is a reply to message #1630621] Mon, 23 February 2015 12:32 Go to previous messageGo to next message
Jim Seconde is currently offline Jim SecondeFriend
Messages: 19
Registered: February 2015
Junior Member
Sorted, thanks for your help Michael!
Re: Newbie - Reading in data basics [message #1632717 is a reply to message #1630843] Tue, 24 February 2015 12:42 Go to previous messageGo to next message
Jim Seconde is currently offline Jim SecondeFriend
Messages: 19
Registered: February 2015
Junior Member
Although it appears I'm not out of the mire yet.

Number formatting through GUI tools in BIRT is, at best, inconsistent.

I'm trying to format a number in millions to be truncated and rounded down - the same technique used in the 'multiplier' field in the image above.

If you have a crosstab field, no multiplier option is available. You can only format the number, which is no good: 1234567 would need to be 123.4M, Adding the suffix and one decimal point is no problem. But I can't truncate the number. Is the best way to sort this by calling the number formatter JavaScript function in onRender?
Re: Newbie - Reading in data basics [message #1652003 is a reply to message #1632717] Thu, 05 March 2015 16:44 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

You could modify the binding to multiply by 0.000001

Michael

Developer Evangelist, Silanis
Re: Newbie - Reading in data basics [message #1660929 is a reply to message #1652003] Mon, 09 March 2015 11:56 Go to previous message
Jim Seconde is currently offline Jim SecondeFriend
Messages: 19
Registered: February 2015
Junior Member
Changed the binding, worked thanks
Previous Topic:Transposing columns to rows with totals for bar chart
Next Topic:Split by data separated by blank space
Goto Forum:
  


Current Time: Thu Jul 18 01:30:29 GMT 2024

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

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

Back to the top