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.

Comments

jordanmagnuson’s picture

Issue summary: View changes

Updated issue summary.

JustBlackBird’s picture

Category: Feature request » Bug report
Issue summary: View changes

Decimal values cannot be plotted with Google Visualization API at all. The problem makes the module useless for me.

JustBlackBird’s picture

Status: Active » Needs review
StatusFileSize
new568 bytes

I've created a patch for the problem.

manuelBS’s picture

Status: Needs review » Needs work

With 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.

Niremizov’s picture

Well 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.

Niremizov’s picture

Status: Needs work » Fixed

ManualBS - probably your comment deserves separate 'feature request' where you can propose some implementation of desired behaviour.

  • Niremizov committed b02440a on 8.x-1.x
    Issue #1913416 - Allow graphing decimal values, ported to D8 branch.
    
Niremizov’s picture

Also Visualization API JS lib does not understand float numbers with comma as delimiter even if they passed as a string.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

chuckbroker’s picture

The 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];