srk0143 / dwpe

Automatically exported from code.google.com/p/dwpe
MIT License
0 stars 0 forks source link

currency and financial symbols should be parsed correctly #16

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently, if a field value is something like " $ 1,123.23" the value will be 
excluded from the graph.

Currency symbols should be ignored when testing if fields should be graphed.  
If a table has 
currency values prefixed with " $ ", the numeric value held after the prefix 
should be used in the 
graph.  Similarly a "," in a numeric field should be permitted.

Similarly, if a numeric value is encapsulated in parenthesis, the value should 
be interpreted as 
negative.

Original issue reported on code.google.com by displague on 16 Apr 2010 at 3:15

GoogleCodeExporter commented 9 years ago

Original comment by scottj...@gmail.com on 23 Apr 2010 at 8:24

GoogleCodeExporter commented 9 years ago
Modify line 55 of visualize.jQuery.js from:
    dataGroups[i].points.push( parseFloat($(this).text()) );
to:
    dataGroups[i].points.push( parseFloat($(this).text().replace(/[^\d.]/g,'')) );

You'll probably want something similar on line 67. 

Original comment by Phrog...@gmail.com on 30 Sep 2010 at 8:36

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I made the change noted above and am seeing the same issue. Numbers in the 
millions look really bad without a dollar sign and commas.

Original comment by Ben.Hofs...@gmail.com on 14 Aug 2012 at 8:36

Attachments: