cms/app-client/app/components/visu-langues.js
changeset 39 c693e8673d5b
child 45 b9adc23abd01
equal deleted inserted replaced
38:2a2402372b6d 39:c693e8673d5b
       
     1 import Ember from 'ember';
       
     2 
       
     3 export default Ember.Component.extend({
       
     4   didInsertElement: function(){
       
     5     var data = google.visualization.arrayToDataTable([
       
     6       ['Location', 'Parent', 'Market trade volume (size)', 'Market increase/decrease (color)'],
       
     7       ['Global',    null,                 0,                               0],
       
     8       ['America',   'Global',             0,                               0],
       
     9       ['Europe',    'Global',             0,                               0],
       
    10       ['Asia',      'Global',             0,                               0],
       
    11       ['Australia', 'Global',             0,                               0],
       
    12       ['Africa',    'Global',             0,                               0],
       
    13       ['Brazil',    'America',            11,                              10],
       
    14       ['USA',       'America',            52,                              31],
       
    15       ['Mexico',    'America',            24,                              12],
       
    16       ['Canada',    'America',            16,                              -23],
       
    17       ['France',    'Europe',             42,                              -11],
       
    18       ['Germany',   'Europe',             31,                              -2],
       
    19       ['Sweden',    'Europe',             22,                              -13],
       
    20       ['Italy',     'Europe',             17,                              4],
       
    21       ['UK',        'Europe',             21,                              -5],
       
    22       ['China',     'Asia',               36,                              4],
       
    23       ['Japan',     'Asia',               20,                              -12],
       
    24       ['India',     'Asia',               40,                              63],
       
    25       ['Laos',      'Asia',               4,                               34],
       
    26       ['Mongolia',  'Asia',               1,                               -5],
       
    27       ['Israel',    'Asia',               12,                              24],
       
    28       ['Iran',      'Asia',               18,                              13],
       
    29       ['Pakistan',  'Asia',               11,                              -52],
       
    30       ['Egypt',     'Africa',             21,                              0],
       
    31       ['S. Africa', 'Africa',             30,                              43],
       
    32       ['Sudan',     'Africa',             12,                              2],
       
    33       ['Congo',     'Africa',             10,                              12],
       
    34       ['Zaire',     'Africa',             8,                               10]
       
    35     ]);
       
    36 
       
    37     var tree = new google.visualization.TreeMap(document.getElementById('chart_div'));
       
    38 
       
    39     tree.draw(data, {
       
    40       minColor: '#f00',
       
    41       midColor: '#ddd',
       
    42       maxColor: '#0d0',
       
    43       headerHeight: 15,
       
    44       fontColor: 'black',
       
    45       showScale: true
       
    46     });
       
    47   }
       
    48 });