Skip to content

Commit

Permalink
Add mongo adapter library to composer.
Browse files Browse the repository at this point in the history
Fix chart bug related to json_encode changes in php7
  • Loading branch information
jdorn committed Jul 13, 2017
1 parent ec703c5 commit 43adca0
Show file tree
Hide file tree
Showing 3 changed files with 144 additions and 7 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"phpoffice/phpexcel": "dev-develop",
"adodb/adodb-php": "dev-master",
"lespoilus/spyc": "dev-master",
"google/apiclient": "1.0.*@beta"
"google/apiclient": "1.0.*@beta",
"alcaeus/mongo-php-adapter": "^1.1@dev"
},
"autoload": {
"files": [
Expand Down
137 changes: 132 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion templates/default/html/chart_report.twig
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,20 @@
options_{{chart.num}}.colors.push('{{color}}');
{% endfor %}
if(!options_{{chart.num}}.colors.length) {
delete options_{{chart.num}}.colors;
}
if(Array.isArray(options_{{ chart.num }}.series)) {
var t = options_{{ chart.num }}.series;
var n = {};
for(var i=0;i<t.length;i++) {
n[i+''] = t[i];
}
options_{{ chart.num }}.series = n;
}
{% if chart.type == "Timeline" %}
var chart_{{chart.num}} = new links.Timeline(document.getElementById('chart_div_{{chart.num}}'));
{% elseif chart.type == "Bar" or chart.type == "Line" %}
Expand Down

0 comments on commit 43adca0

Please sign in to comment.