-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.php
More file actions
36 lines (30 loc) · 847 Bytes
/
Copy pathtest.php
File metadata and controls
36 lines (30 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
google.charts.load("current", {packages:["corechart"]});
var data = [
["", "", {role: "style"}],
["Описание 1", 10, "#cccccc"],
["Описание 2", 8, "#56b900"]
];
drawHistogramChart(data, 'capital');
function drawHistogramChart( info, id ) {
var data = google.visualization.arrayToDataTable(info);
var view = new google.visualization.DataView(data),
max = 0;
for(itm in info ) {
if( max < info[itm][1] ) {
max = info[itm][1];
}
}
var options = {
title : "",
chartArea : {left: 0, top: 0, width: '100%', height: '100%'},
backgroundColor: 'transparent',
bar : {groupWidth: "95%"},
width : 280,
vAxis : {
minValue: 0,
maxValue: max
}
};
var chart = new google.visualization.ColumnChart(document.getElementById(id));
chart.draw(view, options);
}