Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AIEngine
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-AIEngine
Commits
fff86753
Commit
fff86753
authored
May 31, 2021
by
wangdong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fin
parent
71f1ccd7
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
333 additions
and
183 deletions
+333
-183
src/renderer/components/ResultPages/D3Page.vue
src/renderer/components/ResultPages/D3Page.vue
+264
-174
src/renderer/components/ResultPages/MathPage.vue
src/renderer/components/ResultPages/MathPage.vue
+5
-3
src/renderer/store/mutations.js
src/renderer/store/mutations.js
+17
-1
src/renderer/store/rootState.js
src/renderer/store/rootState.js
+1
-0
src/utils/timechart.js
src/utils/timechart.js
+46
-5
No files found.
src/renderer/components/ResultPages/D3Page.vue
View file @
fff86753
This diff is collapsed.
Click to expand it.
src/renderer/components/ResultPages/MathPage.vue
View file @
fff86753
<
template
>
<div>
<el-progress
:percentage=
"process"
:format=
"format"
></el-progress>
<el-popover
<
!--
<
el-popover
placement=
"right"
width=
"600"
trigger=
"hover"
...
...
@@ -34,7 +34,7 @@
slot
=
"
reference
"
>
资源利用率提升比例
<
span
>
\
({
U_A
-
U_T
\
over
U_T
}
=
\
)
<
/span> {{up.toFixed
(
2
)
}}
<span>
\(\%\)
</
span
><
/br></
div
>
<
/el-popover
>
<
/el-popover>
--
>
<
cal
-
page
><
/cal-page
>
<
d
-
3
-
page
><
/d-3-page
>
<!--
<
div
id
=
'
question-id
'
v
-
html
=
"
newlatex
"
>
...
...
@@ -61,7 +61,8 @@ export default {
return
{
process
:
0
,
works_requires
:[
1.98
,
2.0
,
3.39
,
4.69
,
6.01
,
7.35
,
8.69
,
10.01
,
11.4
,
12.79
,
14.01
,
15.41
,
16
],
requires
:
[[
1.98
,
1.98
,
1.98
],
[
1.98
,
1.98
,
2.0
],
[
1.98
,
1.98
,
3.39
],
[
1.98
,
1.98
,
4.69
],
[
1.98
,
1.98
,
6.01
],
[
1.98
,
1.98
,
7.35
],
[
1.98
,
1.98
,
8.69
],
[
1.98
,
1.98
,
10.01
],
[
1.98
,
1.98
,
11.4
],
[
1.98
,
1.98
,
12.79
],
[
1.98
,
2.0
,
1.98
],
[
1.98
,
2.0
,
2.0
],
[
1.98
,
2.0
,
3.39
],
[
1.98
,
2.0
,
4.69
],
[
1.98
,
2.0
,
6.01
],
[
1.98
,
2.0
,
7.35
],
[
1.98
,
2.0
,
8.69
],
[
1.98
,
2.0
,
10.01
],
[
1.98
,
2.0
,
11.4
],
[
1.98
,
2.0
,
12.79
],
[
1.98
,
3.39
,
1.98
],
[
1.98
,
3.39
,
2.0
],
[
1.98
,
3.39
,
3.39
],
[
1.98
,
3.39
,
4.69
],
[
1.98
,
3.39
,
6.01
],
[
1.98
,
3.39
,
7.35
],
[
1.98
,
3.39
,
8.69
],
[
1.98
,
3.39
,
10.01
],
[
1.98
,
3.39
,
11.4
],
[
1.98
,
4.69
,
1.98
],
[
1.98
,
4.69
,
2.0
],
[
1.98
,
4.69
,
3.39
],
[
1.98
,
4.69
,
4.69
],
[
1.98
,
4.69
,
6.01
],
[
1.98
,
4.69
,
7.35
],
[
1.98
,
4.69
,
8.69
],
[
1.98
,
4.69
,
10.01
],
[
1.98
,
6.01
,
1.98
],
[
1.98
,
6.01
,
2.0
],
[
1.98
,
6.01
,
3.39
],
[
1.98
,
6.01
,
4.69
],
[
1.98
,
6.01
,
6.01
],
[
1.98
,
6.01
,
7.35
],
[
1.98
,
6.01
,
8.69
],
[
1.98
,
7.35
,
1.98
],
[
1.98
,
7.35
,
2.0
],
[
1.98
,
7.35
,
3.39
],
[
1.98
,
7.35
,
4.69
],
[
1.98
,
7.35
,
6.01
],
[
1.98
,
7.35
,
7.35
],
[
1.98
,
8.69
,
1.98
],
[
1.98
,
8.69
,
2.0
],
[
1.98
,
8.69
,
3.39
],
[
1.98
,
8.69
,
4.69
],
[
1.98
,
8.69
,
6.01
],
[
1.98
,
10.01
,
1.98
],
[
1.98
,
10.01
,
2.0
],
[
1.98
,
10.01
,
3.39
],
[
1.98
,
10.01
,
4.69
],
[
1.98
,
11.4
,
1.98
],
[
1.98
,
11.4
,
2.0
],
[
1.98
,
11.4
,
3.39
],
[
1.98
,
12.79
,
1.98
],
[
1.98
,
12.79
,
2.0
],
[
2.0
,
1.98
,
1.98
],
[
2.0
,
1.98
,
2.0
],
[
2.0
,
1.98
,
3.39
],
[
2.0
,
1.98
,
4.69
],
[
2.0
,
1.98
,
6.01
],
[
2.0
,
1.98
,
7.35
],
[
2.0
,
1.98
,
8.69
],
[
2.0
,
1.98
,
10.01
],
[
2.0
,
1.98
,
11.4
],
[
2.0
,
1.98
,
12.79
],
[
2.0
,
2.0
,
1.98
],
[
2.0
,
2.0
,
2.0
],
[
2.0
,
2.0
,
3.39
],
[
2.0
,
2.0
,
4.69
],
[
2.0
,
2.0
,
6.01
],
[
2.0
,
2.0
,
7.35
],
[
2.0
,
2.0
,
8.69
],
[
2.0
,
2.0
,
10.01
],
[
2.0
,
2.0
,
11.4
],
[
2.0
,
2.0
,
12.79
],
[
2.0
,
3.39
,
1.98
],
[
2.0
,
3.39
,
2.0
],
[
2.0
,
3.39
,
3.39
],
[
2.0
,
3.39
,
4.69
],
[
2.0
,
3.39
,
6.01
],
[
2.0
,
3.39
,
7.35
],
[
2.0
,
3.39
,
8.69
],
[
2.0
,
3.39
,
10.01
],
[
2.0
,
3.39
,
11.4
],
[
2.0
,
4.69
,
1.98
],
[
2.0
,
4.69
,
2.0
],
[
2.0
,
4.69
,
3.39
],
[
2.0
,
4.69
,
4.69
],
[
2.0
,
4.69
,
6.01
],
[
2.0
,
4.69
,
7.35
],
[
2.0
,
4.69
,
8.69
],
[
2.0
,
4.69
,
10.01
],
[
2.0
,
6.01
,
1.98
],
[
2.0
,
6.01
,
2.0
],
[
2.0
,
6.01
,
3.39
],
[
2.0
,
6.01
,
4.69
],
[
2.0
,
6.01
,
6.01
],
[
2.0
,
6.01
,
7.35
],
[
2.0
,
6.01
,
8.69
],
[
2.0
,
7.35
,
1.98
],
[
2.0
,
7.35
,
2.0
],
[
2.0
,
7.35
,
3.39
],
[
2.0
,
7.35
,
4.69
],
[
2.0
,
7.35
,
6.01
],
[
2.0
,
7.35
,
7.35
],
[
2.0
,
8.69
,
1.98
],
[
2.0
,
8.69
,
2.0
],
[
2.0
,
8.69
,
3.39
],
[
2.0
,
8.69
,
4.69
],
[
2.0
,
8.69
,
6.01
],
[
2.0
,
10.01
,
1.98
],
[
2.0
,
10.01
,
2.0
],
[
2.0
,
10.01
,
3.39
],
[
2.0
,
10.01
,
4.69
],
[
2.0
,
11.4
,
1.98
],
[
2.0
,
11.4
,
2.0
],
[
2.0
,
11.4
,
3.39
],
[
2.0
,
12.79
,
1.98
],
[
2.0
,
12.79
,
2.0
],
[
3.39
,
1.98
,
1.98
],
[
3.39
,
1.98
,
2.0
],
[
3.39
,
1.98
,
3.39
],
[
3.39
,
1.98
,
4.69
],
[
3.39
,
1.98
,
6.01
],
[
3.39
,
1.98
,
7.35
],
[
3.39
,
1.98
,
8.69
],
[
3.39
,
1.98
,
10.01
],
[
3.39
,
1.98
,
11.4
],
[
3.39
,
2.0
,
1.98
],
[
3.39
,
2.0
,
2.0
],
[
3.39
,
2.0
,
3.39
],
[
3.39
,
2.0
,
4.69
],
[
3.39
,
2.0
,
6.01
],
[
3.39
,
2.0
,
7.35
],
[
3.39
,
2.0
,
8.69
],
[
3.39
,
2.0
,
10.01
],
[
3.39
,
2.0
,
11.4
],
[
3.39
,
3.39
,
1.98
],
[
3.39
,
3.39
,
2.0
],
[
3.39
,
3.39
,
3.39
],
[
3.39
,
3.39
,
4.69
],
[
3.39
,
3.39
,
6.01
],
[
3.39
,
3.39
,
7.35
],
[
3.39
,
3.39
,
8.69
],
[
3.39
,
3.39
,
10.01
],
[
3.39
,
4.69
,
1.98
],
[
3.39
,
4.69
,
2.0
],
[
3.39
,
4.69
,
3.39
],
[
3.39
,
4.69
,
4.69
],
[
3.39
,
4.69
,
6.01
],
[
3.39
,
4.69
,
7.35
],
[
3.39
,
4.69
,
8.69
],
[
3.39
,
6.01
,
1.98
],
[
3.39
,
6.01
,
2.0
],
[
3.39
,
6.01
,
3.39
],
[
3.39
,
6.01
,
4.69
],
[
3.39
,
6.01
,
6.01
],
[
3.39
,
6.01
,
7.35
],
[
3.39
,
7.35
,
1.98
],
[
3.39
,
7.35
,
2.0
],
[
3.39
,
7.35
,
3.39
],
[
3.39
,
7.35
,
4.69
],
[
3.39
,
7.35
,
6.01
],
[
3.39
,
8.69
,
1.98
],
[
3.39
,
8.69
,
2.0
],
[
3.39
,
8.69
,
3.39
],
[
3.39
,
8.69
,
4.69
],
[
3.39
,
10.01
,
1.98
],
[
3.39
,
10.01
,
2.0
],
[
3.39
,
10.01
,
3.39
],
[
3.39
,
11.4
,
1.98
],
[
3.39
,
11.4
,
2.0
],
[
4.69
,
1.98
,
1.98
],
[
4.69
,
1.98
,
2.0
],
[
4.69
,
1.98
,
3.39
],
[
4.69
,
1.98
,
4.69
],
[
4.69
,
1.98
,
6.01
],
[
4.69
,
1.98
,
7.35
],
[
4.69
,
1.98
,
8.69
],
[
4.69
,
1.98
,
10.01
],
[
4.69
,
2.0
,
1.98
],
[
4.69
,
2.0
,
2.0
],
[
4.69
,
2.0
,
3.39
],
[
4.69
,
2.0
,
4.69
],
[
4.69
,
2.0
,
6.01
],
[
4.69
,
2.0
,
7.35
],
[
4.69
,
2.0
,
8.69
],
[
4.69
,
2.0
,
10.01
],
[
4.69
,
3.39
,
1.98
],
[
4.69
,
3.39
,
2.0
],
[
4.69
,
3.39
,
3.39
],
[
4.69
,
3.39
,
4.69
],
[
4.69
,
3.39
,
6.01
],
[
4.69
,
3.39
,
7.35
],
[
4.69
,
3.39
,
8.69
],
[
4.69
,
4.69
,
1.98
],
[
4.69
,
4.69
,
2.0
],
[
4.69
,
4.69
,
3.39
],
[
4.69
,
4.69
,
4.69
],
[
4.69
,
4.69
,
6.01
],
[
4.69
,
4.69
,
7.35
],
[
4.69
,
6.01
,
1.98
],
[
4.69
,
6.01
,
2.0
],
[
4.69
,
6.01
,
3.39
],
[
4.69
,
6.01
,
4.69
],
[
4.69
,
6.01
,
6.01
],
[
4.69
,
7.35
,
1.98
],
[
4.69
,
7.35
,
2.0
],
[
4.69
,
7.35
,
3.39
],
[
4.69
,
7.35
,
4.69
],
[
4.69
,
8.69
,
1.98
],
[
4.69
,
8.69
,
2.0
],
[
4.69
,
8.69
,
3.39
],
[
4.69
,
10.01
,
1.98
],
[
4.69
,
10.01
,
2.0
],
[
6.01
,
1.98
,
1.98
],
[
6.01
,
1.98
,
2.0
],
[
6.01
,
1.98
,
3.39
],
[
6.01
,
1.98
,
4.69
],
[
6.01
,
1.98
,
6.01
],
[
6.01
,
1.98
,
7.35
],
[
6.01
,
1.98
,
8.69
],
[
6.01
,
2.0
,
1.98
],
[
6.01
,
2.0
,
2.0
],
[
6.01
,
2.0
,
3.39
],
[
6.01
,
2.0
,
4.69
],
[
6.01
,
2.0
,
6.01
],
[
6.01
,
2.0
,
7.35
],
[
6.01
,
2.0
,
8.69
],
[
6.01
,
3.39
,
1.98
],
[
6.01
,
3.39
,
2.0
],
[
6.01
,
3.39
,
3.39
],
[
6.01
,
3.39
,
4.69
],
[
6.01
,
3.39
,
6.01
],
[
6.01
,
3.39
,
7.35
],
[
6.01
,
4.69
,
1.98
],
[
6.01
,
4.69
,
2.0
],
[
6.01
,
4.69
,
3.39
],
[
6.01
,
4.69
,
4.69
],
[
6.01
,
4.69
,
6.01
],
[
6.01
,
6.01
,
1.98
],
[
6.01
,
6.01
,
2.0
],
[
6.01
,
6.01
,
3.39
],
[
6.01
,
6.01
,
4.69
],
[
6.01
,
7.35
,
1.98
],
[
6.01
,
7.35
,
2.0
],
[
6.01
,
7.35
,
3.39
],
[
6.01
,
8.69
,
1.98
],
[
6.01
,
8.69
,
2.0
],
[
7.35
,
1.98
,
1.98
],
[
7.35
,
1.98
,
2.0
],
[
7.35
,
1.98
,
3.39
],
[
7.35
,
1.98
,
4.69
],
[
7.35
,
1.98
,
6.01
],
[
7.35
,
1.98
,
7.35
],
[
7.35
,
2.0
,
1.98
],
[
7.35
,
2.0
,
2.0
],
[
7.35
,
2.0
,
3.39
],
[
7.35
,
2.0
,
4.69
],
[
7.35
,
2.0
,
6.01
],
[
7.35
,
2.0
,
7.35
],
[
7.35
,
3.39
,
1.98
],
[
7.35
,
3.39
,
2.0
],
[
7.35
,
3.39
,
3.39
],
[
7.35
,
3.39
,
4.69
],
[
7.35
,
3.39
,
6.01
],
[
7.35
,
4.69
,
1.98
],
[
7.35
,
4.69
,
2.0
],
[
7.35
,
4.69
,
3.39
],
[
7.35
,
4.69
,
4.69
],
[
7.35
,
6.01
,
1.98
],
[
7.35
,
6.01
,
2.0
],
[
7.35
,
6.01
,
3.39
],
[
7.35
,
7.35
,
1.98
],
[
7.35
,
7.35
,
2.0
],
[
8.69
,
1.98
,
1.98
],
[
8.69
,
1.98
,
2.0
],
[
8.69
,
1.98
,
3.39
],
[
8.69
,
1.98
,
4.69
],
[
8.69
,
1.98
,
6.01
],
[
8.69
,
2.0
,
1.98
],
[
8.69
,
2.0
,
2.0
],
[
8.69
,
2.0
,
3.39
],
[
8.69
,
2.0
,
4.69
],
[
8.69
,
2.0
,
6.01
],
[
8.69
,
3.39
,
1.98
],
[
8.69
,
3.39
,
2.0
],
[
8.69
,
3.39
,
3.39
],
[
8.69
,
3.39
,
4.69
],
[
8.69
,
4.69
,
1.98
],
[
8.69
,
4.69
,
2.0
],
[
8.69
,
4.69
,
3.39
],
[
8.69
,
6.01
,
1.98
],
[
8.69
,
6.01
,
2.0
],
[
10.01
,
1.98
,
1.98
],
[
10.01
,
1.98
,
2.0
],
[
10.01
,
1.98
,
3.39
],
[
10.01
,
1.98
,
4.69
],
[
10.01
,
2.0
,
1.98
],
[
10.01
,
2.0
,
2.0
],
[
10.01
,
2.0
,
3.39
],
[
10.01
,
2.0
,
4.69
],
[
10.01
,
3.39
,
1.98
],
[
10.01
,
3.39
,
2.0
],
[
10.01
,
3.39
,
3.39
],
[
10.01
,
4.69
,
1.98
],
[
10.01
,
4.69
,
2.0
],
[
11.4
,
1.98
,
1.98
],
[
11.4
,
1.98
,
2.0
],
[
11.4
,
1.98
,
3.39
],
[
11.4
,
2.0
,
1.98
],
[
11.4
,
2.0
,
2.0
],
[
11.4
,
2.0
,
3.39
],
[
11.4
,
3.39
,
1.98
],
[
11.4
,
3.39
,
2.0
],
[
12.79
,
1.98
,
1.98
],
[
12.79
,
1.98
,
2.0
],
[
12.79
,
2.0
,
1.98
],
[
12.79
,
2.0
,
2.0
]],
requires
:[[
1.98
,
1.98
,
1.98
],
[
1.98
,
1.98
,
2.0
],
[
1.98
,
1.98
,
3.39
],
[
1.98
,
2.0
,
1.98
],
[
1.98
,
2.0
,
2.0
],
[
1.98
,
2.0
,
3.39
],
[
1.98
,
3.39
,
1.98
],
[
1.98
,
3.39
,
2.0
],
[
2.0
,
1.98
,
1.98
],
[
2.0
,
1.98
,
2.0
],
[
2.0
,
1.98
,
3.39
],
[
2.0
,
2.0
,
1.98
],
[
2.0
,
2.0
,
2.0
],
[
2.0
,
2.0
,
3.39
],
[
2.0
,
3.39
,
1.98
],
[
2.0
,
3.39
,
2.0
],
[
3.39
,
1.98
,
1.98
],
[
3.39
,
1.98
,
2.0
],
[
3.39
,
2.0
,
1.98
],
[
3.39
,
2.0
,
2.0
]],
// requires: [[1.98, 1.98, 1.98], [1.98, 1.98, 2.0], [1.98, 1.98, 3.39], [1.98, 1.98, 4.69], [1.98, 1.98, 6.01], [1.98, 1.98, 7.35], [1.98, 2.0, 1.98], [1.98, 2.0, 2.0], [1.98, 2.0, 3.39], [1.98, 2.0, 4.69], [1.98, 2.0, 6.01], [1.98, 2.0, 7.35], [1.98, 3.39, 1.98], [1.98, 3.39, 2.0], [1.98, 3.39, 3.39], [1.98, 3.39, 4.69], [1.98, 3.39, 6.01], [1.98, 4.69, 1.98], [1.98, 4.69, 2.0], [1.98, 4.69, 3.39], [1.98, 4.69, 4.69], [1.98, 6.01, 1.98], [1.98, 6.01, 2.0], [1.98, 6.01, 3.39], [1.98, 7.35, 1.98], [1.98, 7.35, 2.0], [2.0, 1.98, 1.98], [2.0, 1.98, 2.0], [2.0, 1.98, 3.39], [2.0, 1.98, 4.69], [2.0, 1.98, 6.01], [2.0, 1.98, 7.35], [2.0, 2.0, 1.98], [2.0, 2.0, 2.0], [2.0, 2.0, 3.39], [2.0, 2.0, 4.69], [2.0, 2.0, 6.01], [2.0, 2.0, 7.35], [2.0, 3.39, 1.98], [2.0, 3.39, 2.0], [2.0, 3.39, 3.39], [2.0, 3.39, 4.69], [2.0, 3.39, 6.01], [2.0, 4.69, 1.98], [2.0, 4.69, 2.0], [2.0, 4.69, 3.39], [2.0, 4.69, 4.69], [2.0, 6.01, 1.98], [2.0, 6.01, 2.0], [2.0, 6.01, 3.39], [2.0, 7.35, 1.98], [2.0, 7.35, 2.0], [3.39, 1.98, 1.98], [3.39, 1.98, 2.0], [3.39, 1.98, 3.39], [3.39, 1.98, 4.69], [3.39, 1.98, 6.01], [3.39, 2.0, 1.98], [3.39, 2.0, 2.0], [3.39, 2.0, 3.39], [3.39, 2.0, 4.69], [3.39, 2.0, 6.01], [3.39, 3.39, 1.98], [3.39, 3.39, 2.0], [3.39, 3.39, 3.39], [3.39, 3.39, 4.69], [3.39, 4.69, 1.98], [3.39, 4.69, 2.0], [3.39, 4.69, 3.39], [3.39, 6.01, 1.98], [3.39, 6.01, 2.0], [4.69, 1.98, 1.98], [4.69, 1.98, 2.0], [4.69, 1.98, 3.39], [4.69, 1.98, 4.69], [4.69, 2.0, 1.98], [4.69, 2.0, 2.0], [4.69, 2.0, 3.39], [4.69, 2.0, 4.69], [4.69, 3.39, 1.98], [4.69, 3.39, 2.0], [4.69, 3.39, 3.39], [4.69, 4.69, 1.98], [4.69, 4.69, 2.0], [6.01, 1.98, 1.98], [6.01, 1.98, 2.0], [6.01, 1.98, 3.39], [6.01, 2.0, 1.98], [6.01, 2.0, 2.0], [6.01, 2.0, 3.39], [6.01, 3.39, 1.98], [6.01, 3.39, 2.0], [7.35, 1.98, 1.98], [7.35, 1.98, 2.0], [7.35, 2.0, 1.98], [7.35, 2.0, 2.0]],
hover
:
false
,
utilization_a
:
2
,
questionToOptions
:
""
,
...
...
@@ -153,6 +154,7 @@ export default {
}
,
mounted
()
{
//this.requires.push=[[2.5, 4, 5],[6.5, 4, 5],[5, 3, 7.5]]
//
this
.
count
();
}
,
methods
:
{
...
...
src/renderer/store/mutations.js
View file @
fff86753
...
...
@@ -31,7 +31,14 @@ const mutations = {
}
,
up
(
state
,
obj
)
{
return
state
.
up
=
obj
.
up
;
if
(
state
.
ups
.
length
==
120
){
state
.
ups
.
push
(
obj
.
up
).
shift
()
}
else
{
state
.
ups
.
push
(
obj
.
up
)
}
return
state
.
up
=
avg
(
state
.
ups
);
}
}
const
resize_
=
(
arr
)
=>
{
...
...
@@ -40,4 +47,13 @@ const mutations = {
}
return
arr
}
const
avg
=
(
arr
)
=>
{
let
add
=
0
for
(
let
i
in
arr
){
add
+=
arr
[
i
]
}
console
.
log
(
add
)
console
.
log
(
add
/
arr
.
length
)
return
add
/
arr
.
length
}
export
default
mutations
;
\ No newline at end of file
src/renderer/store/rootState.js
View file @
fff86753
const
state
=
{
flag
:
true
,
up
:
0
,
ups
:[],
slice_info
:[],
ue_list
:[],
ue_list1
:[],
...
...
src/utils/timechart.js
View file @
fff86753
...
...
@@ -233,7 +233,7 @@ export default function legend() {
}
export
function
timechart
(
g
,
width
,
height
,
duration
,
mode
)
{
var
legend
=
g
var
x_values
=
[];
var
y_values
=
[];
var
y
=
d3
.
scaleLog
()
...
...
@@ -260,15 +260,15 @@ export function timechart(g, width, height, duration, mode) {
}
else
{
y
=
d3
.
scale
Sqrt
()
y
=
d3
.
scale
Linear
()
.
range
([
height
,
0
])
.
domain
([
0
,
4
00
])
.
domain
([
1
,
1
00
])
var
y_axis
=
g
.
append
(
"
g
"
)
.
attr
(
"
class
"
,
"
axis y
"
)
.
attr
(
"
transform
"
,
"
translate(
"
+
width
+
"
)
"
)
.
call
(
d3
.
axisRight
(
y
)
.
tickFormat
(
d3
.
format
(
'
.2s
'
))
.
tickValues
([
30
,
100
,
4
00
])
.
tickValues
([
0
,
30
,
50
,
1
00
])
// .tickSize(-width)
);
}
...
...
@@ -384,11 +384,52 @@ export function timechart(g, width, height, duration, mode) {
}
}
function
text
(
text
,
text1
){
console
.
log
(
legend
.
selectAll
(
"
#rates
"
))
if
(
legend
.
selectAll
(
"
#rates
"
).
_groups
[
0
].
length
==
1
){
legend
.
select
(
"
#rates
"
)
.
text
(
function
(
d
)
{
return
''
;
})
.
text
(
function
(
d
)
{
return
text
.
toFixed
(
1
)
+
'
%
'
;
});
legend
.
select
(
"
#rates1
"
)
.
text
(
function
(
d
)
{
return
''
;
})
.
text
(
function
(
d
)
{
return
Number
(
text1
*
1.0
).
toFixed
(
1
)
+
'
%
'
;
});
}
if
(
legend
.
selectAll
(
"
#rates
"
).
_groups
[
0
].
length
==
0
){
legend
.
append
(
"
text
"
)
.
attr
(
"
transform
"
,
"
translate(
"
+
580
+
"
,
"
+
50
+
"
)
"
)
.
attr
(
"
id
"
,
"
rates
"
)
.
style
(
"
text-anchor
"
,
"
end
"
)
//样式对齐
.
text
(
function
(
d
)
{
return
text
.
toFixed
(
1
)
+
'
%
'
;
});
legend
.
append
(
"
text
"
)
.
attr
(
"
transform
"
,
"
translate(
"
+
580
+
"
,
"
+
110
+
"
)
"
)
.
attr
(
"
id
"
,
"
rates1
"
)
.
style
(
"
text-anchor
"
,
"
end
"
)
//样式对齐
.
text
(
function
(
d
)
{
return
Number
(
text1
*
1.0
).
toFixed
(
1
)
+
'
%
'
;
});
}
}
return
{
append
:
append
append
:
append
,
text
:
text
,
};
}
export
function
append
(
time
,
sample
)
{
...
...
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