Since Chart module is being end of life, I have ported the module to depend on Google Chart Tools module (which uses the Google Visualisation API). In doing so I had to patch Google Chart Tools to work with the AJAX callbacks done by the blocks (see Issue 1613258)

CommentFileSizeAuthor
google_analytics_reports.chart_.patch13.87 KBgrom358
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Plazik’s picture

We already have the similar issue #2169159: Migrate from Chart module to Charts where people talk about Charts module https://www.drupal.org/project/charts.

Anyway, I'm planning to build reports in Reports module base on Google Analytics Views module so it will be
easier to add support of Charts or Google Chart Tools modules.

Plazik’s picture

Version: 7.x-1.3 » 7.x-3.x-dev
Status: Needs review » Closed (duplicate)

@grom358, please post your patch in issue #2169159: Migrate from Chart module to Charts.

xtfer’s picture

  1. +++ b/google_analytics_reports/google_analytics_reports.blocks.inc
    @@ -44,29 +44,50 @@ function google_analytics_reports_path_mini_build($path) {
    +  $chart = draw_chart($settings);
    

    This should technically be "google_chart_tools_draw_chart()". I'd be inclined to check if the function exists before calling it, and if not, also try the correctly named version. This protects against breakage when/if that gets fixed.

  2. +++ b/google_analytics_reports/google_analytics_reports.blocks.inc
    @@ -85,27 +106,48 @@ function google_analytics_reports_dashboard_build() {
    +    )
    

    Closing comma?

  3. +++ b/google_analytics_reports/google_analytics_reports.pages.inc
    @@ -73,26 +73,44 @@ function _google_analytics_reports_visits() {
    +    )
    

    Closing comma?

  4. +++ b/google_analytics_reports/google_analytics_reports.pages.inc
    @@ -73,26 +73,44 @@ function _google_analytics_reports_visits() {
    +  $chart = draw_chart($settings);
    

    draw_chart() again...

  5. +++ b/google_analytics_reports/google_analytics_reports.pages.inc
    @@ -113,26 +131,44 @@ function _google_analytics_reports_pageviews($path) {
    +    )
    

    Closing comma?

  6. +++ b/google_analytics_reports/google_analytics_reports.pages.inc
    @@ -113,26 +131,44 @@ function _google_analytics_reports_pageviews($path) {
    +  $chart = draw_chart($settings);
    

    And another draw_chart().