Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
graph
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李伟@五瓣科技
graph
Commits
370eaf0d
Commit
370eaf0d
authored
Jul 20, 2022
by
wenli.huang@wuban.net.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
up
parent
8d7b07e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
28 deletions
+28
-28
App.js
src/App.js
+28
-28
No files found.
src/App.js
View file @
370eaf0d
...
@@ -60,35 +60,35 @@ class App extends Component {
...
@@ -60,35 +60,35 @@ class App extends Component {
allLinksArr
=
Links
allLinksArr
=
Links
// console.log(Rows, TopAxisX, BottomAxisX, Links)
// console.log(Rows, TopAxisX, BottomAxisX, Links)
that
.
initChart
(
resData
)
that
.
initChart
(
resData
)
that
.
interval
=
setInterval
(()
=>
{
//
that.interval = setInterval(() => {
fetch
(
`/api/graph_by_height_and_duration?height=0&duration=
${
that
.
state
.
requestDuration
}
`
,{
//
fetch(`/api/graph_by_height_and_duration?height=0&duration=${that.state.requestDuration}`,{
method
:
'
GET
'
,
//
method:'GET',
headers
:{
//
headers:{
'
Content-Type
'
:
'
application/json;charset=UTF-8
'
//
'Content-Type':'application/json;charset=UTF-8'
},
//
},
})
//
})
.
then
(
res
=>
res
.
json
())
//
.then(res =>res.json())
.
then
((
newData
)
=>
{
//
.then((newData) => {
let
{
Rows
,
AxisX
,
Links
}
=
newData
.
result
//
let {Rows, AxisX, Links } = newData.result
let
{
TopAxisX
,
BottomAxisX
}
=
AxisX
//
let {TopAxisX, BottomAxisX} = AxisX
allRows0Arr
=
Rows
[
0
]
//
allRows0Arr = Rows[0]
allRows1Arr
=
Rows
[
1
]
//
allRows1Arr = Rows[1]
allRows2Arr
=
Rows
[
2
]
//
allRows2Arr = Rows[2]
allTopAxisXArr
=
TopAxisX
//
allTopAxisXArr = TopAxisX
allBottomAxisXArr
=
BottomAxisX
//
allBottomAxisXArr = BottomAxisX
allLinksArr
=
Links
//
allLinksArr = Links
newData
.
result
.
Rows
[
0
]
=
allRows0Arr
//
newData.result.Rows[0] = allRows0Arr
newData
.
result
.
Rows
[
1
]
=
allRows1Arr
//
newData.result.Rows[1] = allRows1Arr
newData
.
result
.
Rows
[
2
]
=
allRows2Arr
//
newData.result.Rows[2] = allRows2Arr
newData
.
result
.
AxisX
.
TopAxisX
=
allTopAxisXArr
//
newData.result.AxisX.TopAxisX = allTopAxisXArr
newData
.
result
.
AxisX
.
BottomAxisX
=
allBottomAxisXArr
//
newData.result.AxisX.BottomAxisX = allBottomAxisXArr
newData
.
result
.
Links
=
allLinksArr
//
newData.result.Links = allLinksArr
that
.
initChart
(
newData
)
//
that.initChart(newData)
})
//
})
},
5000
);
//
}, 5000);
var
chartDom
=
document
.
getElementById
(
'
main
'
);
var
chartDom
=
document
.
getElementById
(
'
main
'
);
var
myChart
=
echarts
.
init
(
chartDom
);
var
myChart
=
echarts
.
init
(
chartDom
);
myChart
.
on
(
'
datazoom
'
,
function
(
params
){
myChart
.
on
(
'
datazoom
'
,
function
(
params
){
...
@@ -615,8 +615,8 @@ class App extends Component {
...
@@ -615,8 +615,8 @@ class App extends Component {
<
div
id
=
"
main
"
className
=
"
container
"
style
=
{{
position
:
'
relative
'
,
padding
:
'
50px
'
,
boxSizing
:
'
border-box
'
,
width
:
'
100%
'
,
height
:
900
}}
>
<
div
id
=
"
main
"
className
=
"
container
"
style
=
{{
position
:
'
relative
'
,
padding
:
'
50px
'
,
boxSizing
:
'
border-box
'
,
width
:
'
100%
'
,
height
:
900
}}
>
<
/div
>
<
/div
>
<
div
style
=
{{
position
:
'
absolute
'
,
left
:
'
1%
'
,
top
:
'
70%
'
,
fontSize
:
'
12px
'
}}
>
{
startText
}
<
/div
>
<
div
style
=
{{
position
:
'
absolute
'
,
left
:
'
1%
'
,
top
:
'
70%
'
,
fontSize
:
'
12px
'
,
color
:
'
#80828a
'
}}
>
{
startText
}
<
/div
>
<
div
style
=
{{
position
:
'
absolute
'
,
right
:
'
5%
'
,
top
:
'
70%
'
,
fontSize
:
'
12px
'
}}
>
{
endText
}
<
/div
>
<
div
style
=
{{
position
:
'
absolute
'
,
right
:
'
5%
'
,
top
:
'
70%
'
,
fontSize
:
'
12px
'
,
color
:
'
#80828a
'
}}
>
{
endText
}
<
/div
>
<
/div
>
<
/div
>
);
);
}
}
...
...
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