Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MindSpore
mindinsight
提交
94d15a0b
M
mindinsight
项目概览
MindSpore
/
mindinsight
通知
7
Star
3
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindinsight
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
94d15a0b
编写于
7月 14, 2020
作者:
X
xiayifan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
UI fixed the coordinate axis text is not clearly displayed
上级
60203207
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
68 addition
and
33 deletion
+68
-33
mindinsight/ui/src/components/histogramUnit.vue
mindinsight/ui/src/components/histogramUnit.vue
+32
-17
mindinsight/ui/src/views/train-manage/histogram.vue
mindinsight/ui/src/views/train-manage/histogram.vue
+34
-15
mindinsight/ui/src/views/train-manage/tensor.vue
mindinsight/ui/src/views/train-manage/tensor.vue
+2
-1
未找到文件。
mindinsight/ui/src/components/histogramUnit.vue
浏览文件 @
94d15a0b
...
...
@@ -173,11 +173,12 @@ export default {
);
const
fullScreenFun
=
this
.
toggleFullScreen
;
const
axisName
=
this
.
axisName
;
const
that
=
this
;
const
option
=
{
grid
:
{
left
:
24
,
top
:
60
,
right
:
5
0
,
right
:
8
0
,
bottom
:
60
,
},
xAxis
:
{
...
...
@@ -187,11 +188,7 @@ export default {
axisLabel
:
{
fontSize
:
'
11
'
,
formatter
:
function
(
value
)
{
if
(
value
.
toString
().
length
>=
6
)
{
return
value
.
toExponential
(
3
);
}
else
{
return
Math
.
round
(
value
*
1000
)
/
1000
;
}
return
that
.
formateNUmber
(
value
);
},
},
splitLine
:
{
show
:
false
},
...
...
@@ -204,6 +201,9 @@ export default {
boundaryGap
:
false
,
axisLabel
:
{
fontSize
:
'
11
'
,
formatter
:
function
(
value
)
{
return
that
.
formateNUmber
(
value
);
},
},
},
toolbox
:
{
...
...
@@ -276,7 +276,6 @@ export default {
option
.
grid
.
right
=
140
;
}
option
.
yAxis
.
inverse
=
true
;
const
that
=
this
;
option
.
yAxis
.
axisLabel
.
formatter
=
function
(
value
)
{
return
that
.
yAxisFormatter
(
value
);
};
...
...
@@ -303,14 +302,12 @@ export default {
this
.
removeTooltip
();
if
(
!
this
.
fullScreen
)
{
if
(
this
.
axisName
===
2
)
{
// this.charObj.setOption({grid: {right: 140}});
this
.
charOption
.
grid
.
right
=
140
;
}
this
.
charOption
.
toolbox
.
feature
.
myToolFullScreen
.
iconStyle
.
borderColor
=
'
#3E98C5
'
;
}
else
{
// this.charObj.setOption({grid: {right: 40}});
this
.
charOption
.
grid
.
right
=
40
;
this
.
charOption
.
grid
.
right
=
80
;
this
.
charOption
.
toolbox
.
feature
.
myToolFullScreen
.
iconStyle
.
borderColor
=
'
#6D7278
'
;
}
...
...
@@ -388,16 +385,31 @@ export default {
)
:
[];
}
else
if
(
this
.
axisName
===
1
)
{
data
=
`
${(
filter
[
0
].
relative_time
/
3600
).
toFixed
(
3
)}
h`
;
data
=
`
${
this
.
formateNUmber
(
(
filter
[
0
].
relative_time
/
3600
).
toFixed
(
3
),
)}
h`
;
}
else
{
data
=
filter
[
0
].
step
;
data
=
this
.
formateNUmber
(
filter
[
0
].
step
)
;
}
}
return
data
;
},
/**
* Formate time display
* @param {Onject} time
* @param {Number} value
* @return {Number} Formatted number
*/
formateNUmber
(
value
)
{
value
=
Number
(
value
);
if
(
value
.
toString
().
length
>
6
)
{
return
value
.
toExponential
(
3
);
}
else
{
return
Math
.
round
(
value
*
1000
)
/
1000
;
}
},
/**
* Formate time display
* @param {Object} time
* @return {String} Formatted time
*/
dealrelativeTime
(
time
)
{
...
...
@@ -510,9 +522,11 @@ export default {
hoveredAxis
.
toString
().
length
>=
6
?
yValueFormat
(
hoveredAxis
)
:
hoveredAxis
}
</td><td style="text-align:center;">
${
hoveredItem
.
step
}
</td><td>
${(
hoveredItem
.
relative_time
/
1000
).
toFixed
(
3
)}${
unit
}
</td><td>
${
this
.
dealrelativeTime
(
}
</td><td style="text-align:center;">
${
this
.
formateNUmber
(
hoveredItem
.
step
,
)}
</td><td>
${
this
.
formateNUmber
(
(
hoveredItem
.
relative_time
/
1000
).
toFixed
(
3
),
)}${
unit
}
</td><td>
${
this
.
dealrelativeTime
(
new
Date
(
hoveredItem
.
wall_time
*
1000
).
toString
(),
)}
</td>`
;
const
dom
=
document
.
querySelector
(
'
#tipTr
'
);
...
...
@@ -563,7 +577,8 @@ export default {
20
-
offsetTop
}
px`
;
}
if
(
width
+
e
.
event
.
x
+
50
>
screenWidth
&&
screenWidth
>
width
)
{
// Blank area on the right of the chart is 80
if
(
width
+
e
.
event
.
x
+
80
>
screenWidth
&&
screenWidth
>
width
)
{
document
.
querySelector
(
'
#echartTip
'
).
style
.
left
=
`
${
e
.
event
.
x
-
width
-
20
}
px`
;
...
...
mindinsight/ui/src/views/train-manage/histogram.vue
浏览文件 @
94d15a0b
...
...
@@ -770,9 +770,11 @@ export default {
hoveredAxis
.
toString
().
length
>=
6
?
yValueFormat
(
hoveredAxis
)
:
hoveredAxis
}
</td><td style="text-align:center;">
${
hoveredItem
.
step
}
</td><td>
${(
hoveredItem
.
relative_time
/
1000
).
toFixed
(
3
)}${
unit
}
</td><td>
${
this
.
dealrelativeTime
(
}
</td><td style="text-align:center;">
${
this
.
formateNUmber
(
hoveredItem
.
step
,
)}
</td><td>
${
this
.
formateNUmber
(
(
hoveredItem
.
relative_time
/
1000
).
toFixed
(
3
),
)}${
unit
}
</td><td>
${
this
.
dealrelativeTime
(
new
Date
(
hoveredItem
.
wall_time
*
1000
).
toString
(),
)}
</td>`
;
const
dom
=
document
.
querySelector
(
'
#tipTr
'
);
...
...
@@ -816,7 +818,8 @@ export default {
20
-
offsetTop
}
px`
;
}
if
(
width
+
e
.
event
.
x
+
50
>
screenWidth
&&
screenWidth
>
width
)
{
// Blank area on the right of the chart is 80
if
(
width
+
e
.
event
.
x
+
80
>
screenWidth
&&
screenWidth
>
width
)
{
document
.
querySelector
(
'
#echartTip
'
).
style
.
left
=
`
${
e
.
event
.
x
-
width
-
20
}
px`
;
...
...
@@ -1118,11 +1121,12 @@ export default {
);
const
fullScreenFun
=
this
.
toggleFullScreen
;
const
curAxisName
=
this
.
curAxisName
;
const
that
=
this
;
const
option
=
{
grid
:
{
left
:
24
,
top
:
60
,
right
:
5
0
,
right
:
8
0
,
bottom
:
60
,
},
xAxis
:
{
...
...
@@ -1132,11 +1136,7 @@ export default {
axisLabel
:
{
fontSize
:
'
11
'
,
formatter
:
function
(
value
)
{
if
(
value
.
toString
().
length
>=
6
)
{
return
value
.
toExponential
(
3
);
}
else
{
return
Math
.
round
(
value
*
1000
)
/
1000
;
}
return
that
.
formateNUmber
(
value
);
},
},
splitLine
:
{
show
:
false
},
...
...
@@ -1149,6 +1149,9 @@ export default {
boundaryGap
:
false
,
axisLabel
:
{
fontSize
:
'
11
'
,
formatter
:
function
(
value
)
{
return
that
.
formateNUmber
(
value
);
},
},
},
toolbox
:
{
...
...
@@ -1222,7 +1225,6 @@ export default {
option
.
grid
.
right
=
140
;
}
option
.
yAxis
.
inverse
=
true
;
const
that
=
this
;
option
.
yAxis
.
axisLabel
.
formatter
=
function
(
value
)
{
return
that
.
yAxisFormatter
(
sampleObject
,
value
);
};
...
...
@@ -1248,16 +1250,33 @@ export default {
if
(
filter
.
length
)
{
if
(
this
.
curAxisName
===
2
)
{
data
=
sampleObject
.
fullScreen
?
this
.
dealrelativeTime
(
new
Date
(
filter
[
0
].
wall_time
*
1000
).
toString
())
?
this
.
dealrelativeTime
(
new
Date
(
filter
[
0
].
wall_time
*
1000
).
toString
(),
)
:
[];
}
else
if
(
this
.
curAxisName
===
1
)
{
data
=
`
${(
filter
[
0
].
relative_time
/
3600
).
toFixed
(
3
)}
h`
;
data
=
`
${
this
.
formateNUmber
(
(
filter
[
0
].
relative_time
/
3600
).
toFixed
(
3
),
)}
h`
;
}
else
{
data
=
filter
[
0
].
step
;
data
=
this
.
formateNUmber
(
filter
[
0
].
step
)
;
}
}
return
data
;
},
/**
* Formate time display
* @param {Number} value
* @return {Number} Formatted number
*/
formateNUmber
(
value
)
{
value
=
Number
(
value
);
if
(
value
.
toString
().
length
>
6
)
{
return
value
.
toExponential
(
3
);
}
else
{
return
Math
.
round
(
value
*
1000
)
/
1000
;
}
},
formatColor
(
str
)
{
if
(
!
str
)
{
return
;
...
...
@@ -1331,7 +1350,7 @@ export default {
sampleObject
.
charOption
.
toolbox
.
feature
.
myToolFullScreen
.
iconStyle
.
borderColor
=
'
#3E98C5
'
;
}
else
{
sampleObject
.
charOption
.
grid
.
right
=
4
0
;
sampleObject
.
charOption
.
grid
.
right
=
8
0
;
sampleObject
.
charOption
.
toolbox
.
feature
.
myToolFullScreen
.
iconStyle
.
borderColor
=
'
#6D7278
'
;
}
...
...
mindinsight/ui/src/views/train-manage/tensor.vue
浏览文件 @
94d15a0b
...
...
@@ -98,7 +98,7 @@ limitations under the License.
</div>
<div
class=
"sample-content"
v-for=
"sampleItem in originDataArr"
:key=
"sampleItem.
domId
"
:key=
"sampleItem.
ref
"
:class=
"sampleItem.fullScreen ? 'char-full-screen' : ''"
v-show=
"sampleItem.show"
>
<div
class=
"chars-container"
>
...
...
@@ -416,6 +416,7 @@ export default {
*/
filterChange
(
data
,
sampleItem
)
{
sampleItem
.
filterStr
=
`[
${
data
.
toString
()}
]`
;
sampleItem
.
newDataFlag
=
true
;
this
.
freshtMartixData
(
sampleItem
);
},
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录