forked from ElemeFE/v-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.vue
45 lines (42 loc) · 866 Bytes
/
init.vue
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
<template>
<!-- 测试属性
theme: Object
themeName: String
initOptions: { type: Object, default () { return {} } }
-->
<div>
theme
<ve-line :data="chartData" :theme="theme"></ve-line>
themeName
<ve-line :data="chartData" theme-name="test"></ve-line>
initOptions svg
<ve-line :data="chartData" :init-options="initOptions"></ve-line>
</div>
</template>
<script>
import { VeLine } from '../../src/index.es'
import { LINE_DATA } from './data'
import echarts from 'echarts/lib/echarts'
import 'zrender/lib/svg/svg'
echarts.registerTheme('test', {
line: {
smooth: false
}
})
export default {
data () {
this.theme = {
line: {
smooth: false
}
}
this.initOptions = {
renderer: 'svg'
}
return {
chartData: LINE_DATA
}
},
components: { VeLine }
}
</script>