Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function createChart() {
- if (googleChartsLoaded) {
- pivot.googlecharts.getData({
- type: "pie",
- "slice": {
- "rows": [
- {
- "uniqueName": "Mission Outcome"
- }
- ],
- "columns": [
- {
- "uniqueName": "[Measures]"
- }
- ],
- "measures": [
- {
- "uniqueName": "Launch Date",
- "aggregation": "count"
- }
- ]
- }
- },
- drawChart,
- drawChart
- );
- }
- }
- function drawChart(_data) {
- var data = google.visualization.arrayToDataTable(_data.data);
- var options = {
- title: "Outcomes of SpaceX missions",
- legend: {
- position: 'top'
- },
- colors: ['#49a6df', '#f0b33f']
- };
- var chart = new google.visualization.PieChart(document.getElementById('googlechart-container'));
- chart.draw(data, options);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement