-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c8e4596
commit 0ca8f71
Showing
14 changed files
with
327 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,22 @@ | ||
export default [] | ||
export default [ | ||
{ | ||
title: '折线图', | ||
routeName: 'BasicLineDemo', | ||
showItem: true | ||
}, | ||
{ | ||
title: '折线图-堆叠', | ||
routeName: 'BasicLineStackDemo', | ||
showItem: true | ||
}, | ||
{ | ||
title: '面积图', | ||
routeName: 'BasicLineAreaDemo', | ||
showItem: true | ||
}, | ||
{ | ||
title: '面积图-堆叠', | ||
routeName: 'BasicLineAreaStackDemo', | ||
showItem: true | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
export default [ | ||
{ | ||
path: '/basic-line-demo', | ||
name: 'BasicLineDemo', | ||
component: () => import('@/views/basic/line/BasicLineDemo.vue') | ||
}, | ||
{ | ||
path: '/basic-line-area-demo', | ||
name: 'BasicLineAreaDemo', | ||
component: () => import('@/views/basic/line/BasicLineAreaDemo.vue') | ||
}, | ||
{ | ||
path: '/basic-line-stack-demo', | ||
name: 'BasicLineStackDemo', | ||
component: () => import('@/views/basic/line/BasicLineStackDemo.vue') | ||
}, | ||
{ | ||
path: '/basic-line-stack-demo', | ||
name: 'BasicLineAreaStackDemo', | ||
component: () => import('@/views/basic/line/BasicLineAreaStackDemo.vue') | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<script setup lang="ts"> | ||
import { BasicChart, allEchartsOptions } from 'dz-bi-chart' | ||
defineOptions({ | ||
name: 'BasicLineAreaDemo' | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div | ||
style=" | ||
height: 400px; | ||
padding: 28px; | ||
background: #fff; | ||
border-radius: 12px; | ||
box-shadow: 0 0 8px #eee; | ||
" | ||
> | ||
<BasicChart :options="allEchartsOptions.basicLineArea" /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<script setup lang="ts"> | ||
import { BasicChart, allEchartsOptions } from 'dz-bi-chart' | ||
defineOptions({ | ||
name: 'BasicLineAreaStackDemo' | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div | ||
style=" | ||
height: 400px; | ||
padding: 28px; | ||
background: #fff; | ||
border-radius: 12px; | ||
box-shadow: 0 0 8px #eee; | ||
" | ||
> | ||
<BasicChart :options="allEchartsOptions.basicLineAreaStack" /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<script setup lang="ts"> | ||
import { BasicChart, allEchartsOptions } from 'dz-bi-chart' | ||
defineOptions({ | ||
name: 'BasicLineDemo' | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div | ||
style=" | ||
height: 400px; | ||
padding: 28px; | ||
background: #fff; | ||
border-radius: 12px; | ||
box-shadow: 0 0 8px #eee; | ||
" | ||
> | ||
<BasicChart :options="allEchartsOptions.basicLine" /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<script setup lang="ts"> | ||
import { BasicChart, allEchartsOptions } from 'dz-bi-chart' | ||
defineOptions({ | ||
name: 'BasicLineStackDemo' | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div | ||
style=" | ||
height: 400px; | ||
padding: 28px; | ||
background: #fff; | ||
border-radius: 12px; | ||
box-shadow: 0 0 8px #eee; | ||
" | ||
> | ||
<BasicChart :options="allEchartsOptions.basicLineStack" /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './bar' | ||
export * from './pie' | ||
export * from './line' |
35 changes: 35 additions & 0 deletions
35
packages/bi-chart/components/basic-chart/chart-option/line/basic-line-area-stack.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { categoryXAxis, colors, grid, legend, valueYAxis } from './basic' | ||
|
||
export default { | ||
colors, | ||
tooltip: { | ||
trigger: 'axis' | ||
}, | ||
legend, | ||
grid, | ||
xAxis: categoryXAxis, | ||
yAxis: valueYAxis, | ||
series: [ | ||
{ | ||
areaStyle: {}, | ||
stack: 'Total', | ||
name: '外呼总时长', | ||
type: 'line', | ||
data: [150, 230, 224, 218, 135, 147, 260] | ||
}, | ||
{ | ||
areaStyle: {}, | ||
stack: 'Total', | ||
name: '外呼平均通话时长', | ||
type: 'line', | ||
data: [250, 130, 124, 318, 235, 247, 160] | ||
}, | ||
{ | ||
areaStyle: {}, | ||
stack: 'Total', | ||
name: '通时评分', | ||
type: 'line', | ||
data: [450, 530, 324, 118, 335, 347, 60] | ||
} | ||
] | ||
} |
32 changes: 32 additions & 0 deletions
32
packages/bi-chart/components/basic-chart/chart-option/line/basic-line-area.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { categoryXAxis, colors, grid, legend, valueYAxis } from './basic' | ||
|
||
export default { | ||
colors, | ||
tooltip: { | ||
trigger: 'axis' | ||
}, | ||
legend, | ||
grid, | ||
xAxis: categoryXAxis, | ||
yAxis: valueYAxis, | ||
series: [ | ||
{ | ||
areaStyle: {}, | ||
name: '外呼总时长', | ||
type: 'line', | ||
data: [150, 230, 224, 218, 135, 147, 260] | ||
}, | ||
{ | ||
areaStyle: {}, | ||
name: '外呼平均通话时长', | ||
type: 'line', | ||
data: [250, 130, 124, 318, 235, 247, 160] | ||
}, | ||
{ | ||
areaStyle: {}, | ||
name: '通时评分', | ||
type: 'line', | ||
data: [450, 530, 324, 118, 335, 347, 60] | ||
} | ||
] | ||
} |
32 changes: 32 additions & 0 deletions
32
packages/bi-chart/components/basic-chart/chart-option/line/basic-line-stack.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { categoryXAxis, colors, grid, legend, valueYAxis } from './basic' | ||
|
||
export default { | ||
colors, | ||
tooltip: { | ||
trigger: 'axis' | ||
}, | ||
legend, | ||
grid, | ||
xAxis: categoryXAxis, | ||
yAxis: valueYAxis, | ||
series: [ | ||
{ | ||
name: '外呼总时长', | ||
type: 'line', | ||
stack: 'Total', | ||
data: [150, 230, 224, 218, 135, 147, 260] | ||
}, | ||
{ | ||
name: '外呼平均通话时长', | ||
type: 'line', | ||
stack: 'Total', | ||
data: [250, 130, 124, 318, 235, 247, 160] | ||
}, | ||
{ | ||
name: '通时评分', | ||
type: 'line', | ||
stack: 'Total', | ||
data: [450, 530, 324, 118, 335, 347, 60] | ||
} | ||
] | ||
} |
29 changes: 29 additions & 0 deletions
29
packages/bi-chart/components/basic-chart/chart-option/line/basic-line.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { categoryXAxis, colors, grid, legend, valueYAxis } from './basic' | ||
|
||
export default { | ||
colors, | ||
tooltip: { | ||
trigger: 'axis' | ||
}, | ||
legend, | ||
grid, | ||
xAxis: categoryXAxis, | ||
yAxis: valueYAxis, | ||
series: [ | ||
{ | ||
name: '外呼总时长', | ||
type: 'line', | ||
data: [150, 230, 224, 218, 135, 147, 260] | ||
}, | ||
{ | ||
name: '外呼平均通话时长', | ||
type: 'line', | ||
data: [250, 130, 124, 318, 235, 247, 160] | ||
}, | ||
{ | ||
name: '通时评分', | ||
type: 'line', | ||
data: [450, 530, 324, 118, 335, 347, 60] | ||
} | ||
] | ||
} |
63 changes: 63 additions & 0 deletions
63
packages/bi-chart/components/basic-chart/chart-option/line/basic.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// X 轴展示类目 | ||
export const categoryXAxis = { | ||
type: 'category', | ||
boundaryGap: false, | ||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], | ||
axisLabel: { | ||
interval: 0, // 横轴信息显示全部 | ||
color: '#9CA6B9', | ||
fontSize: 14 | ||
}, | ||
axisLine: { | ||
lineStyle: { | ||
type: 'dashed', | ||
color: '#E1E4E8' | ||
} | ||
} | ||
} | ||
|
||
// Y 轴展示值 | ||
export const valueYAxis = { | ||
type: 'value', | ||
splitLine: { | ||
show: true, | ||
lineStyle: { | ||
type: 'dashed', | ||
color: '#E1E4E8' | ||
} | ||
}, | ||
axisLabel: { | ||
color: '#9CA6B9', | ||
fontSize: 14 | ||
} | ||
} | ||
|
||
// 图例 | ||
export const legend = { | ||
icon: 'circle', | ||
itemWidth: 8, | ||
itemHeight: 8, | ||
itemGap: 25, // 图例每项之间的间隔 | ||
textStyle: { | ||
fontSize: 12, //字体大小 | ||
color: '#646B7A' //字体颜色 | ||
} | ||
} | ||
|
||
// 折线图 grid 样式 | ||
export const grid = { | ||
left: '3%', | ||
right: '4%', | ||
bottom: '0%', | ||
containLabel: true | ||
} | ||
|
||
// 通用颜色 | ||
export const colors = [ | ||
'#0056FF', | ||
'#2ED4A9', | ||
'#FF7125', | ||
'#FFC420', | ||
'#F12525', | ||
'#646B7A' | ||
] |
4 changes: 4 additions & 0 deletions
4
packages/bi-chart/components/basic-chart/chart-option/line/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export { default as basicLine } from './basic-line' | ||
export { default as basicLineArea } from './basic-line-area' | ||
export { default as basicLineStack } from './basic-line-stack' | ||
export { default as basicLineAreaStack } from './basic-line-area-stack' |