Line 55 of google_visualization_api.inc reads:
foreach ($options['fields'] as $name => $column) {
if (!empty($column['enabled'])) {
$value = (int) $row[$name];
$table_row[] = $value;
}
}
Why force all values to be rounded ints? Seems very strange.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | visualization-allow-graphing-decimals-1913416-2.patch | 568 bytes | JustBlackBird |
Comments
Comment #0.0
jordanmagnuson commentedUpdated issue summary.
Comment #1
JustBlackBird commentedDecimal values cannot be plotted with Google Visualization API at all. The problem makes the module useless for me.
Comment #2
JustBlackBird commentedI've created a patch for the problem.
Comment #3
manuelBS commentedWith the patch it works, but only if you set the field formatter in the view to have decimal point instead of comma as decimal separator. So I guess there needs to be some work to let the display work with both separator.
Comment #4
Niremizov commentedWell actually, there is some number formats where comma represent thousands separator. This makes hard guessing what convertion should be made.
I, suppose, that user should care about data he is sending to chart.
Comment #6
Niremizov commentedManualBS - probably your comment deserves separate 'feature request' where you can propose some implementation of desired behaviour.
Comment #8
Niremizov commentedAlso Visualization API JS lib does not understand float numbers with comma as delimiter even if they passed as a string.
Comment #10
chuckbroker commentedThe truncated decimials issue also appears in the highcharts.inc file. Changing line 73 as follows seems to fix the issue for me.
From:
$value = (int) $row[$name];
To:
$value = (float) $row[$name];