File tree 1 file changed +5
-4
lines changed
src/main/javascript/collection
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
function initPage ( statByCategories , statByCountries ) {
2
- google . charts . load ( '44' , { 'packages' :[ 'corechart' ] } ) ;
3
- google . charts . setOnLoadCallback ( function ( ) {
2
+ var chartsVersion = '44' ;
3
+ google . charts . load ( chartsVersion , { 'packages' :[ 'corechart' ] } ) ;
4
+ google . charts . setOnLoadCallback ( function drawCharts ( ) {
4
5
drawChart ( 'categories-chart' , createCategoriesDataTable ( statByCategories ) ) ;
5
6
drawChart ( 'countries-chart' , createCountriesDataTable ( statByCountries ) ) ;
6
7
} ) ;
7
8
}
8
9
9
- function drawChart ( containerId , table ) {
10
+ function drawChart ( containerId , dataTable ) {
10
11
var options = {
11
12
pieHole : 0.3
12
13
} ;
13
14
var chart = new google . visualization . PieChart ( document . getElementById ( containerId ) ) ;
14
- chart . draw ( table , options ) ;
15
+ chart . draw ( dataTable , options ) ;
15
16
} ;
16
17
17
18
function createCategoriesDataTable ( stat ) {
You can’t perform that action at this time.
0 commit comments