d
This commit is contained in:
+1
-1
@@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<button class="retrieve btn">View Profile</button>
|
<button class="retrieve btn">view profile</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,10 @@
|
|||||||
google.charts.load('current', {'packages':['corechart']});
|
google.charts.load('current', {'packages':['corechart']});
|
||||||
<<<<<<< HEAD
|
|
||||||
google.charts.setOnLoadCallback(drawChart);
|
google.charts.setOnLoadCallback(drawChart);
|
||||||
google.charts.load('current', {'packages':['bar']});
|
google.charts.load('current', {'packages':['bar']});
|
||||||
google.charts.setOnLoadCallback(drawBarChart);
|
google.charts.setOnLoadCallback(drawBarChart);
|
||||||
=======
|
|
||||||
google.charts.setOnLoadCallback(drawChart);
|
|
||||||
google.charts.load('current', {'packages':['bar']});
|
|
||||||
google.charts.setOnLoadCallback(drawChart);
|
|
||||||
>>>>>>> parent of 3e059c2... d
|
|
||||||
|
|
||||||
function drawChart() {
|
function drawChart() {
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
var data = google.visualization.arrayToDataTable([
|
var data = google.visualization.arrayToDataTable([
|
||||||
['Task', 'Amount'],
|
['Task', 'Amount'],
|
||||||
['Food and Dining', 11],
|
['Food and Dining', 11],
|
||||||
@@ -22,29 +15,14 @@ function drawChart() {
|
|||||||
['Other',7]
|
['Other',7]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
var options = {
|
var options = {
|
||||||
title: 'Spending Breakdown'
|
title: 'Spending Breakdown'
|
||||||
};
|
};
|
||||||
|
|
||||||
var chart = new google.visualization.PieChart(document.getElementById('piechart'));
|
var chart = new google.visualization.PieChart(document.getElementById('piechart'));
|
||||||
=======
|
|
||||||
var data = google.visualization.arrayToDataTable([
|
|
||||||
['Task', 'Hours per Day'],
|
|
||||||
['Food and Dining', 11],
|
|
||||||
['Clothing', 2],
|
|
||||||
['Entertainment', 2],
|
|
||||||
['Transportation', 7],
|
|
||||||
['Other', 1]
|
|
||||||
]);
|
|
||||||
|
|
||||||
var options = {
|
|
||||||
title: 'My Daily Activities'
|
|
||||||
};
|
|
||||||
>>>>>>> parent of 3e059c2... d
|
|
||||||
|
|
||||||
var chart = new google.visualization.PieChart(document.getElementById('piechart'));
|
|
||||||
chart.draw(data, options);
|
chart.draw(data, options);
|
||||||
<<<<<<< HEAD
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function drawBarChart() {
|
function drawBarChart() {
|
||||||
@@ -70,46 +48,3 @@ function drawChart() {
|
|||||||
|
|
||||||
chart.draw(data, google.charts.Bar.convertOptions(options));
|
chart.draw(data, google.charts.Bar.convertOptions(options));
|
||||||
}
|
}
|
||||||
=======
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
function drawChart() {
|
|
||||||
var data = google.visualization.arrayToDataTable([
|
|
||||||
['Category', 'You', 'Average 18 Year Old'],
|
|
||||||
['Food and Dining', 1000, 400],
|
|
||||||
['Utilities', 1170, 460],
|
|
||||||
['Clothing', 660, 120],
|
|
||||||
['Entertainment', 1030, 540],
|
|
||||||
['Transportation', 1030, 540],
|
|
||||||
['Other', 1030, 540]
|
|
||||||
]);
|
|
||||||
|
|
||||||
var options = {
|
|
||||||
chart: {
|
|
||||||
title: 'Comparing Spending Habits',
|
|
||||||
subtitle: 'Based on other 18 year olds',
|
|
||||||
},
|
|
||||||
bars: 'horizontal', // Required for Material Bar Charts.
|
|
||||||
hAxis: {
|
|
||||||
format: 'decimal'
|
|
||||||
},
|
|
||||||
height: 400,
|
|
||||||
colors: ['#1b9e77', '#d95f02', '#7570b3']
|
|
||||||
};
|
|
||||||
|
|
||||||
var chart = new google.charts.Bar(document.getElementById('chart_div'));
|
|
||||||
|
|
||||||
chart.draw(data, google.charts.Bar.convertOptions(options));
|
|
||||||
|
|
||||||
var btns = document.getElementById('btn-group');
|
|
||||||
|
|
||||||
btns.onclick = function(e) {
|
|
||||||
|
|
||||||
if (e.target.tagName === 'BUTTON') {
|
|
||||||
options.hAxis.format = e.target.id === 'none' ? '' : e.target.id;
|
|
||||||
chart.draw(data, google.charts.Bar.convertOptions(options));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
>>>>>>> parent of 3e059c2... d
|
|
||||||
|
|||||||
Reference in New Issue
Block a user