dev/core#1409 Remove net_amount from Addtional Payment form
[civicrm-core.git] / CRM / Contribute / Form / ContributionCharts.php
index ac5866da5bd00bd10a6453274356642e48dfa157..158db37c79d4a4dfa8e2b2aed42b6f972998afeb 100644 (file)
@@ -173,11 +173,11 @@ class CRM_Contribute_Form_ContributionCharts extends CRM_Core_Form {
         $monthlyChart = TRUE;
       }
 
-      $values['divName'] = "open_flash_chart_{$chartKey}";
+      $values['divName'] = "chart_{$chartKey}";
       $funName = ($chartType == 'bvg') ? 'barChart' : 'pieChart';
 
       // build the chart objects.
-      $values['object'] = CRM_Utils_OpenFlashChart::$funName($values);
+      $values['object'] = CRM_Utils_Chart::$funName($values);
 
       //build the urls.
       $urlCnt = 0;
@@ -230,8 +230,8 @@ class CRM_Contribute_Form_ContributionCharts extends CRM_Core_Form {
     // finally assign this chart data to template.
     $this->assign('hasYearlyChart', $yearlyChart);
     $this->assign('hasByMonthChart', $monthlyChart);
-    $this->assign('hasOpenFlashChart', empty($chartData) ? FALSE : TRUE);
-    $this->assign('openFlashChartData', json_encode($chartData));
+    $this->assign('hasChart', empty($chartData) ? FALSE : TRUE);
+    $this->assign('chartData', json_encode($chartData ?? []));
   }
 
 }