This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
cyber-narrator-cn-ui/src/views/charts2/charts/NetworkOverviewLine.vue

77 lines
1.6 KiB
Vue
Raw Normal View History

2022-07-06 21:08:12 +08:00
<template>
2022-07-08 09:34:09 +08:00
<div class="line">
<div id="chart"></div>
<div>
<div>
<span>{{$t('network.metric')}}:</span>
<el-select v-model="value" class="m-2" placeholder="Select" size="small">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select></div>
<div>
<span>{{$t('network.referenceLine')}}:</span>
<el-select v-model="value" class="m-2" placeholder="Select" size="small">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
</div>
</div>
2022-07-06 21:08:12 +08:00
</template>
<script>
2022-07-08 09:34:09 +08:00
import * as echarts from 'echarts'
import { stackedLineChartOption } from '@/views/charts2/charts/options/pie'
2022-07-06 21:08:12 +08:00
export default {
2022-07-08 09:34:09 +08:00
name: 'NetworkOverviewLine',
props: {
chart: Object
},
data () {
return {
options: [
{
value: 'Option1',
label: 'Option1'
},
{
value: 'Option2',
label: 'Option2'
},
{
value: 'Option3',
label: 'Option3'
},
{
value: 'Option4',
label: 'Option4'
},
{
value: 'Option5',
label: 'Option5'
}
]
}
},
methods: {
init () {
const dom = document.getElementById('chart')
const myChart = echarts.init(dom)
myChart.setOption(stackedLineChartOption)
}
},
mounted () {
this.init()
}
2022-07-06 21:08:12 +08:00
}
</script>