This issue is related to the following issue: 2772211

When rendering multiple charts onto a page, including a GeoMap, JS errors appear and no GeoMaps are rendered. If the other charts are removed from the JavaScript, the GeoMaps will render, however whenever a LineChart or BarChart is on the same page, errors like the following appear:

VM11267:2 Uncaught ReferenceError: gvjs_BM is not defined

This seems to have a very simple fix by changing:

  if (typeof google !== 'undefined') {
    google.load('visualization', '1', { callback: renderCharts });
  }

to this:

  if (typeof google !== 'undefined') {
    google.load('visualization', '1', { callback: renderCharts, packages: ['corechart'] });
  }

In the charts_google.js file, I have provided a patch for this issue.

Comments

splendidles created an issue. See original summary.

splendidles’s picture

firewaller’s picture

This works great, fixes the error for me.

TylerMarshall’s picture

Patch applies cleanly to fresh install, vote to move to RTBC.

rob c’s picture

Status: Needs review » Reviewed & tested by the community

This patch seems to address the problem described at #2772211: Customer Map not showing - JS error (together with a patch from that issue to fix other js errors).

Updating to RTBC to get some attention to this issue.

I did already test with latest charts from the repo and while at 050670f the line chart from commerce_reports sales breaks terribly, so we first might want to make sure commerce_reports sales works with the latest version of charts (and where it breaks, downgrading to 2.0-rc1 made it work again in my case).

  • andileco committed f831389 on 7.x-2.x authored by splendidles
    Issue #2808327 by splendidles: Multiple Charts With GeoMap Render Issue
    
andileco’s picture

Status: Reviewed & tested by the community » Fixed
andileco’s picture

Status: Fixed » Closed (fixed)