-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
51 lines (51 loc) · 2.01 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
<!doctype html>
<html>
<head>
<title>Vchart Example</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="//unpkg.com/chartist/dist/chartist.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.2.0/gh-fork-ribbon.min.css" />
</head>
<body><a class="github-fork-ribbon" href="https://github.com/willin/vchart" title="Fork me on GitHub" target="_blank">Fork me on GitHub</a>
<div id="app">
<h2>VChart 示例</h2>
<section>
<div class="customize">
<label>类型 : </label>
<Select v-model="type">
<option>Line</option>
<option>Bar</option>
</select>
<label>标签 : </label>
<input type="text" v-model.lazy="data.labels">
<label>数据 : </label>
<input type="text" v-model.lazy="data.series">
</div>
<vchart
ratio="ct-major-second"
:type="type"
:data="data"
:options="options" >
</vchart>
</section>
</div>
<footer><p>Copyright © <a href="https://willin.wang" target="_blank">Willin Wang</a> 2017</p></footer>
<script src="//unpkg.com/vue"></script>
<script src="//unpkg.com/chartist"></script>
<script src="//unpkg.com/vchart"></script>
<!-- <script src="./dist/vchart.min.js"></script> -->
<script>
new Vue({
el: '#app',
components: { vchart },
data() {
return {
data: { labels: ["周一", "周二", "周三", "周四", "周五"], series: [[4, 3.8, 3, 5, 4.1]]},
type: 'Line',
options: { fullWidth: true, lineSmooth: false }
}
}
})
</script>
</body>
</html>