Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
super-hive-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SuperHive
front-end
super-hive-web
Commits
f96e9363
Commit
f96e9363
authored
Aug 03, 2020
by
wends
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix g2line performance issue
parent
9ac6b3f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
4 deletions
+25
-4
G2Line.vue
src/components/G2Plot/G2Line.vue
+25
-4
No files found.
src/components/G2Plot/G2Line.vue
View file @
f96e9363
<
template
>
<div
:
ref
=
"id"
style=
"height: 100%;width: 100%"
/>
<div
:
id
=
"id"
style=
"height: 100%;width: 100%"
/>
</
template
>
<
script
>
...
...
@@ -32,13 +32,25 @@ export default {
}
},
watch
:
{
title
:
function
(
val
)
{
this
.
line
.
updateConfig
({
title
:
{
visible
:
true
,
text
:
val
},
description
:
{
visible
:
true
,
text
:
`单位为:
${
this
.
description
}
`
}
})
this
.
line
.
render
()
},
lineData
:
function
(
val
)
{
this
.
line
.
changeData
(
val
)
}
},
mounted
()
{
const
el
=
this
.
$refs
[
this
.
id
]
this
.
line
=
new
Line
(
el
,
{
this
.
line
=
new
Line
(
document
.
getElementById
(
this
.
id
),
{
data
:
this
.
lineData
,
title
:
{
visible
:
true
,
...
...
@@ -57,7 +69,13 @@ export default {
crosshairs
:
{
type
:
'
y
'
},
offset
:
20
offset
:
20
,
formatter
:
(
x
,
y
)
=>
{
return
{
name
:
this
.
title
,
value
:
`
${
y
}
${
this
.
description
}
`
}
}
},
description
:
{
visible
:
true
,
...
...
@@ -74,6 +92,9 @@ export default {
]
})
this
.
line
.
render
()
},
beforeDestroy
()
{
this
.
line
.
destroy
()
}
}
</
script
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment