no message
Former-commit-id: 694f4e2186262c81aad85aadc5fb25f9039a67fd Former-commit-id: 47b57c2bbbf4c72528cff394a4ca3da97a01fd4c Former-commit-id: a7572514010d97eeecc80a54e8ffccf8099d7ba3
This commit is contained in:
33
src/pages/demo/chart/demo/PieBase.vue
Normal file
33
src/pages/demo/chart/demo/PieBase.vue
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<template>
|
||||||
|
<Container type="ghost" :responsive="true">
|
||||||
|
<ChartDemoCard v-bind="card" @resize="$refs.chart.resize()">
|
||||||
|
<G2PieBase slot-scope="{data}" ref="chart" :data="data" v-bind="chart"></G2PieBase>
|
||||||
|
</ChartDemoCard>
|
||||||
|
</Container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import publicMixin from './mixins/public'
|
||||||
|
export default {
|
||||||
|
mixins: [
|
||||||
|
publicMixin
|
||||||
|
],
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
// 给卡片容器的参数
|
||||||
|
card: {
|
||||||
|
api: {
|
||||||
|
url: '/api/chart/G2Pie',
|
||||||
|
data: {
|
||||||
|
type: 'base'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 给图表的参数
|
||||||
|
chart: {
|
||||||
|
// 图表设置
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
33
src/pages/demo/chart/demo/barBase.vue
Normal file
33
src/pages/demo/chart/demo/barBase.vue
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<template>
|
||||||
|
<Container type="ghost" :responsive="true">
|
||||||
|
<ChartDemoCard v-bind="card" @resize="$refs.chart.resize()">
|
||||||
|
<G2BarBase slot-scope="{data}" ref="chart" :data="data" v-bind="chart"></G2BarBase>
|
||||||
|
</ChartDemoCard>
|
||||||
|
</Container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import publicMixin from './mixins/public'
|
||||||
|
export default {
|
||||||
|
mixins: [
|
||||||
|
publicMixin
|
||||||
|
],
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
// 给卡片容器的参数
|
||||||
|
card: {
|
||||||
|
api: {
|
||||||
|
url: '/api/chart/G2Bar',
|
||||||
|
data: {
|
||||||
|
type: 'base'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 给图表的参数
|
||||||
|
chart: {
|
||||||
|
// 图表设置
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
33
src/pages/demo/chart/demo/columnBase.vue
Normal file
33
src/pages/demo/chart/demo/columnBase.vue
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<template>
|
||||||
|
<Container type="ghost" :responsive="true">
|
||||||
|
<ChartDemoCard v-bind="card" @resize="$refs.chart.resize()">
|
||||||
|
<G2ColumnBase slot-scope="{data}" ref="chart" :data="data" v-bind="chart"></G2ColumnBase>
|
||||||
|
</ChartDemoCard>
|
||||||
|
</Container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import publicMixin from './mixins/public'
|
||||||
|
export default {
|
||||||
|
mixins: [
|
||||||
|
publicMixin
|
||||||
|
],
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
// 给卡片容器的参数
|
||||||
|
card: {
|
||||||
|
api: {
|
||||||
|
url: '/api/chart/G2Column',
|
||||||
|
data: {
|
||||||
|
type: 'base'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 给图表的参数
|
||||||
|
chart: {
|
||||||
|
// 图表设置
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
33
src/pages/demo/chart/demo/lineBase.vue
Normal file
33
src/pages/demo/chart/demo/lineBase.vue
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<template>
|
||||||
|
<Container type="ghost" :responsive="true">
|
||||||
|
<ChartDemoCard v-bind="card" @resize="$refs.chart.resize()">
|
||||||
|
<G2LineBase slot-scope="{data}" ref="chart" :data="data" v-bind="chart"></G2LineBase>
|
||||||
|
</ChartDemoCard>
|
||||||
|
</Container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import publicMixin from './mixins/public'
|
||||||
|
export default {
|
||||||
|
mixins: [
|
||||||
|
publicMixin
|
||||||
|
],
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
// 给卡片容器的参数
|
||||||
|
card: {
|
||||||
|
api: {
|
||||||
|
url: '/api/chart/G2Line',
|
||||||
|
data: {
|
||||||
|
type: 'base'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 给图表的参数
|
||||||
|
chart: {
|
||||||
|
// 图表设置
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
33
src/pages/demo/chart/demo/lineStep.vue
Normal file
33
src/pages/demo/chart/demo/lineStep.vue
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<template>
|
||||||
|
<Container type="ghost" :responsive="true">
|
||||||
|
<ChartDemoCard v-bind="card" @resize="$refs.chart.resize()">
|
||||||
|
<G2LineStep slot-scope="{data}" ref="chart" :data="data" v-bind="chart"></G2LineStep>
|
||||||
|
</ChartDemoCard>
|
||||||
|
</Container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import publicMixin from './mixins/public'
|
||||||
|
export default {
|
||||||
|
mixins: [
|
||||||
|
publicMixin
|
||||||
|
],
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
// 给卡片容器的参数
|
||||||
|
card: {
|
||||||
|
api: {
|
||||||
|
url: '/api/chart/G2Line',
|
||||||
|
data: {
|
||||||
|
type: 'step'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 给图表的参数
|
||||||
|
chart: {
|
||||||
|
// 图表设置
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
33
src/pages/demo/chart/demo/nightingaleRoseBase.vue
Normal file
33
src/pages/demo/chart/demo/nightingaleRoseBase.vue
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<template>
|
||||||
|
<Container type="ghost" :responsive="true">
|
||||||
|
<ChartDemoCard v-bind="card" @resize="$refs.chart.resize()">
|
||||||
|
<G2NightingaleRoseBase slot-scope="{data}" ref="chart" :data="data" v-bind="chart"></G2NightingaleRoseBase>
|
||||||
|
</ChartDemoCard>
|
||||||
|
</Container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import publicMixin from './mixins/public'
|
||||||
|
export default {
|
||||||
|
mixins: [
|
||||||
|
publicMixin
|
||||||
|
],
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
// 给卡片容器的参数
|
||||||
|
card: {
|
||||||
|
api: {
|
||||||
|
url: '/api/chart/G2NightingaleRose',
|
||||||
|
data: {
|
||||||
|
type: 'base'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 给图表的参数
|
||||||
|
chart: {
|
||||||
|
// 图表设置
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
33
src/pages/demo/chart/demo/radarBase.vue
Normal file
33
src/pages/demo/chart/demo/radarBase.vue
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<template>
|
||||||
|
<Container type="ghost" :responsive="true">
|
||||||
|
<ChartDemoCard v-bind="card" @resize="$refs.chart.resize()">
|
||||||
|
<G2RadarBase slot-scope="{data}" ref="chart" :data="data" v-bind="chart"></G2RadarBase>
|
||||||
|
</ChartDemoCard>
|
||||||
|
</Container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import publicMixin from './mixins/public'
|
||||||
|
export default {
|
||||||
|
mixins: [
|
||||||
|
publicMixin
|
||||||
|
],
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
// 给卡片容器的参数
|
||||||
|
card: {
|
||||||
|
api: {
|
||||||
|
url: '/api/chart/G2Radar',
|
||||||
|
data: {
|
||||||
|
type: 'base'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 给图表的参数
|
||||||
|
chart: {
|
||||||
|
// 图表设置
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -1,3 +1,16 @@
|
|||||||
|
const maker = (name) => {
|
||||||
|
return {
|
||||||
|
title: '面积图',
|
||||||
|
icon: 'file-o',
|
||||||
|
path: `demo/${name}`,
|
||||||
|
name: `demo-chart-demo-${name}`,
|
||||||
|
meta: {
|
||||||
|
requiresAuth: true
|
||||||
|
},
|
||||||
|
component: resolve => { require([`@/pages/demo/chart/demo/${name}.vue`], resolve) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// [图表] 菜单
|
// [图表] 菜单
|
||||||
export const menu = {
|
export const menu = {
|
||||||
title: '图表',
|
title: '图表',
|
||||||
@@ -24,16 +37,14 @@ export const menu = {
|
|||||||
title: '单独演示',
|
title: '单独演示',
|
||||||
icon: 'file-o',
|
icon: 'file-o',
|
||||||
children: [
|
children: [
|
||||||
{
|
maker('areaBase'),
|
||||||
title: '面积图',
|
maker('barBase'),
|
||||||
icon: 'file-o',
|
maker('columnBase'),
|
||||||
path: 'demo/areaBase',
|
maker('lineBase'),
|
||||||
name: 'demo-chart-demo-areaBase',
|
maker('lineStep'),
|
||||||
meta: {
|
maker('nightingaleRoseBase'),
|
||||||
requiresAuth: true
|
maker('pieBase'),
|
||||||
},
|
maker('radarBase')
|
||||||
component: resolve => { require(['@/pages/demo/chart/demo/areaBase.vue'], resolve) }
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user