mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
quest map modify
This commit is contained in:
1 parent
956af624c6
commit
821386a0e4
1 file changed
+25
-5
@@ -5,18 +5,28 @@ import { useToast } from 'vue-toastification'
|
|||||||
import { use, init } from 'echarts/core'
|
import { use, init } from 'echarts/core'
|
||||||
import { GraphChart } from 'echarts/charts'
|
import { GraphChart } from 'echarts/charts'
|
||||||
import { SVGRenderer } from 'echarts/renderers'
|
import { SVGRenderer } from 'echarts/renderers'
|
||||||
import { TitleComponent, TooltipComponent } from 'echarts/components'
|
import {
|
||||||
|
TitleComponent,
|
||||||
|
TooltipComponent,
|
||||||
|
DataZoomComponent,
|
||||||
|
} from 'echarts/components'
|
||||||
import { DAG } from '@linux-odyssey/utils'
|
import { DAG } from '@linux-odyssey/utils'
|
||||||
import api from '../utils/api'
|
import api from '../utils/api'
|
||||||
import { NodeImage } from '../img/svg.js'
|
import { NodeImage } from '../img/svg.js'
|
||||||
|
|
||||||
const marginX = 100
|
const marginX = 200
|
||||||
const marginY = 65
|
const marginY = 65
|
||||||
const chartContainer = ref(null)
|
const chartContainer = ref(null)
|
||||||
let chartInstance = null
|
let chartInstance = null
|
||||||
const fullwidth = window.screen.width
|
const fullwidth = window.screen.width
|
||||||
|
|
||||||
use([GraphChart, SVGRenderer, TitleComponent, TooltipComponent])
|
use([
|
||||||
|
GraphChart,
|
||||||
|
SVGRenderer,
|
||||||
|
TitleComponent,
|
||||||
|
TooltipComponent,
|
||||||
|
DataZoomComponent,
|
||||||
|
])
|
||||||
|
|
||||||
async function getQuests() {
|
async function getQuests() {
|
||||||
try {
|
try {
|
||||||
@@ -43,6 +53,15 @@ const genOption = (nodes, edges) => ({
|
|||||||
tooltip: {},
|
tooltip: {},
|
||||||
animationDurationUpdate: 1500,
|
animationDurationUpdate: 1500,
|
||||||
animationEasingUpdate: 'quinticInOut',
|
animationEasingUpdate: 'quinticInOut',
|
||||||
|
// dataZoom: [
|
||||||
|
// {
|
||||||
|
// type: 'slider', // This type means "slider data zoom" which provides a slider bar for zooming
|
||||||
|
// orient: 'vertical', // This makes the data zoom component vertical
|
||||||
|
// start: 0, // The starting percentage of the window out of the data extent
|
||||||
|
// end: 100, // The ending percentage of the window out of the data extent
|
||||||
|
// show: true,
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
type: 'graph',
|
type: 'graph',
|
||||||
@@ -50,8 +69,9 @@ const genOption = (nodes, edges) => ({
|
|||||||
symbol: () => {
|
symbol: () => {
|
||||||
return NodeImage
|
return NodeImage
|
||||||
},
|
},
|
||||||
symbolSize: [fullwidth / 10, fullwidth / 20],
|
symbolSize: [fullwidth / 10, fullwidth / 25],
|
||||||
roam: false,
|
roam: 'move',
|
||||||
|
zoom: 2,
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
fontSize: fullwidth / 90,
|
fontSize: fullwidth / 90,
|
||||||
|
|||||||
Reference in new issue
Block a user