forked from angular-google-chart/angular-google-chart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
170 lines (146 loc) · 6.6 KB
/
index.html
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<?xml version="1.0" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<head>
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.no-icons.min.css"
rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css" rel="stylesheet">
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<title>
Google Chart Tools AngularJS Directive
</title>
<style type="text/css">
[ng-cloak] {
display: none;
}
body {
padding: 20px;
padding-top: 60px;
padding-bottom: 40px;
}
table td.number {
text-align: right;
}
.navbar-fixed-top {
z-index: 1111;
}
.inputs-list li {
display:inline-block;
margin-right: 20px;
}
.inputs-list > li input[type="checkbox"] {
margin:0;
}
</style>
</head>
<body ng-app="google-chart-sample" ng-cloak="" ng-controller="SampleCtrl">
<div>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a href="" class="brand">angular-google-chart</a>
<div class="nav-collapse">
<ul class="nav">
<li>
<a href="https://github.com/bouil/angular-google-chart"><i class="icon icon-github"></i> Github</a>
</li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
</div>
</div>
<div class="container-fuild">
<div class="row-fluid">
<div class="span12" style="text-align: center;">
<h1>AngularJs Google Chart Tools directive</h1>
<hr/>
</div>
</div>
<div class="row-fluid">
<div class="span4">
<h2>Usage</h2>
<pre ng-non-bindable><div google-chart chart="chart" style="{{chart.cssStyle}}"/></pre>
<h2>Setup</h2>
<pre>$scope.chart = {{chart|json}}</pre>
</div>
<div class="span8">
<h2>Live edit</h2>
<form class="form-horizontal">
<div class="row-fluid">
<div class="control-group span6">
<label class="control-label" for="chartType">February server sale units</label>
<div class="controls">
<input type="number" min="0" max="100" ng-model="chart.data.rows[1].c[3].v"/>
</div>
</div>
<div class="control-group span6">
<label class="control-label" for="chartType">Number of grid lines</label>
<div class="controls">
<input type="number" min="0" max="100" ng-model="chart.options.vAxis.gridlines.count"/>
</div>
</div>
</div>
<div class="row-fluid">
<div class="control-group span6">
<label class="control-label" for="chartType">Chart type</label>
<div class="controls">
<select id="chartType" ng-model="chart.type" ng-change="chartSelectionChange()">
<option value="AreaChart">AreaChart</option>
<option value="PieChart">PieChart</option>
<option value="ColumnChart">ColumnChart</option>
<option value="LineChart">LineChart</option>
<option value="Table">Table</option>
<option value="BarChart">BarChart</option>
</select>
</div>
</div>
<div class="control-group span2">
<label class="control-label" for="hideServer">Hide Server</label>
<div class="controls">
<input id="hideServer" type="checkbox" ng-model="hideServer" ng-change="selectionChange()" />
</div>
</div>
<div class="control-group span2" ng-show="chart.type!='Table'">
<label class="control-label" for="htmlTooltip">HTML Tooltip</label>
<div class="controls">
<input id="htmlTooltip" type="checkbox" ng-model="chart.options.tooltip.isHtml" ng-change="htmlTooltip()" />
</div>
</div>
</div>
<div class="row-fluid" ng-show="chart.type=='Table'">
<label class="control-label" for="chartType">Format</label>
<div class="input controls">
<ul class="inputs-list">
<li ng-repeat="format in formatCollection">
<button class="btn primary" ng-click="toggleFormat(format)">{{format.name}}</button>
</li>
</ul>
</div>
</div>
</form>
<h2>Output</h2>
<div google-chart chart="chart" style="{{chart.cssStyle}}" on-ready="chartReady()" />
</div>
</div>
</div>
</div>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.5/angular.min.js"></script>
<script src="ng-google-chart.js"></script>
<script src="sample.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-3451018-11', 'github.io');
ga('send', 'pageview');
</script>
</body>
</html>