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
88c67866
Commit
88c67866
authored
Jul 01, 2022
by
wenli.huang@wuban.net.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
up
parent
6bc4f917
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
13 deletions
+23
-13
App.js
src/App.js
+23
-13
No files found.
src/App.js
View file @
88c67866
import
React
,
{
Component
}
from
'
react
'
;
import
*
as
echarts
from
'
echarts
'
;
import
dateformat
from
'
dateformat
'
import
moment
from
'
moment
'
class
App
extends
Component
{
state
=
{
...
...
@@ -311,20 +312,29 @@ class App extends Component {
// type:'time',
axisLabel
:
{
formatter
:
(
function
(
value
){
console
.
log
(
Math
.
floor
(
value
/
1000000000
),
'
value
'
);
console
.
log
(
value
,
'
value11
'
);
// let statusPassTime = moment(parseInt(value)).format('YYYY-MM-DD');
console
.
log
(
moment
(
parseInt
(
value
/
1000000
)).
format
(
'
YYYY-MM-DD HH:mm:ss
'
),
'
moment
'
)
// return moment(parseInt(value/1000000)).format('YYYY-MM-DD HH:mm:ss')
return
moment
(
parseInt
(
value
/
1000000
)).
format
(
'
YYYY-MM-DD HH:mm:ss.SSS
'
)
// console.log(Math.floor(value/1000000000),'ddd')
// console.log(dateformat(Math.floor(value/1000000000), 'yyyy-mm-dd HH:MM:ss'),'sssdddggg')
// console.log(dateformat(value/1000000000, 'yyyy-mm-dd HH:MM:ss'),'dddddddddddd')
// return dateformat(value/1000000000, 'yyyy-mm-dd HH:MM:ss')
// console.log(Math.floor(value/1000000000),'value');
// console.log(value,'value11');
// return Math.floor(value/1000000000)
let
label
;
var
t
=
Math
.
floor
(
value
/
1000000000
);
// 天 总秒数/一天的秒数=几天
var
d
=
parseInt
(
t
/
(
24
*
60
*
60
)
);
// 小时 不够一天的秒数可以换算成几小时
var
h
=
parseInt
(
(
t
%
(
24
*
60
*
60
)
)
/
(
60
*
60
)
);
// 分钟 不够一小时的秒数可以换算成几分钟
var
m
=
parseInt
(
(
t
%
(
60
*
60
)
)
/
60
);
//秒数 不够一分钟的秒数可以换算成几秒
var
s
=
t
%
60
;
return
h
+
'
:
'
+
m
+
'
:
'
+
s
// let label;
// // var t = Math.floor(value/1000000000);
// var t=parseInt(value/1000000000)
// // 天 总秒数/一天的秒数=几天
// var d = parseInt( t / (24*60*60) );
// // 小时 不够一天的秒数可以换算成几小时
// var h = parseInt( ( t % (24*60*60) ) / (60*60) );
// // 分钟 不够一小时的秒数可以换算成几分钟
// var m = parseInt( ( t % (60*60) ) / 60 );
// //秒数 不够一分钟的秒数可以换算成几秒
// var s = t % 60 ;
// return d+'-'+h+':'+m+':'+s
})
},
min
:
data
.
result
.
AxisX
.
AxisXBegin
,
...
...
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