Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
VisualDL
提交
3126b0bd
V
VisualDL
项目概览
PaddlePaddle
/
VisualDL
1 年多 前同步成功
通知
88
Star
4655
Fork
642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
5
Wiki
分析
仓库
DevOps
项目成员
Pages
V
VisualDL
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
5
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
3126b0bd
编写于
5月 08, 2018
作者:
J
Jeff Wang
提交者:
GitHub
5月 08, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Ui control improvement (#448)
* Add label for the x-Axis * Add zoom controll and save image feature to embedding.
上级
a4c104d5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
104 addition
and
0 deletion
+104
-0
frontend/src/high-dimensional/ui/Chart.vue
frontend/src/high-dimensional/ui/Chart.vue
+100
-0
frontend/src/scalars/ui/Chart.vue
frontend/src/scalars/ui/Chart.vue
+4
-0
未找到文件。
frontend/src/high-dimensional/ui/Chart.vue
浏览文件 @
3126b0bd
...
...
@@ -6,6 +6,37 @@
ref=
"chartBox"
class=
"visual-dl-chart-box"
:style=
"computedStyle"
/>
<div
class=
"visual-dl-chart-actions"
>
<v-btn
color=
"toolbox_icon"
flat
icon
@
click=
"isSelectZoomEnable = !isSelectZoomEnable"
class=
"chart-toolbox-icons"
>
<img
v-if=
"!isSelectZoomEnable"
src=
"../../assets/ic_zoom_select_off.svg"
>
<img
v-if=
"isSelectZoomEnable"
src=
"../../assets/ic_zoom_select_on.svg"
>
</v-btn>
<v-btn
color=
"toolbox_icon"
flat
icon
@
click=
"restoreChart"
class=
"chart-toolbox-icons"
>
<img
src=
"../../assets/ic_undo.svg"
>
</v-btn>
<v-btn
color=
"toolbox_icon"
flat
icon
@
click=
"saveChartAsImage"
class=
"chart-toolbox-icons"
>
<img
src=
"../../assets/ic_download.svg"
>
</v-btn>
</div>
</v-card>
</
template
>
...
...
@@ -46,6 +77,8 @@ export default {
height
:
600
,
regularLabelColor
:
'
#008c99
'
,
matchedLabelColor
:
'
#c23531
'
,
isSelectZoomEnable
:
true
,
};
},
computed
:
{
...
...
@@ -59,6 +92,7 @@ export default {
this
.
createChart
();
this
.
set2DChartOptions
();
this
.
setDisplayWordLabel
();
this
.
toggleSelectZoom
(
true
);
},
watch
:
{
embeddingData
:
function
(
val
)
{
...
...
@@ -88,6 +122,9 @@ export default {
this
.
myChart
.
hideLoading
();
}
},
isSelectZoomEnable
:
function
(
val
)
{
this
.
toggleSelectZoom
(
val
);
},
},
methods
:
{
createChart
()
{
...
...
@@ -100,6 +137,18 @@ export default {
animation
:
false
,
xAxis
:
{},
yAxis
:
{},
toolbox
:
{
show
:
true
,
showTitle
:
false
,
itemSize
:
0
,
feature
:
{
dataZoom
:
{
},
restore
:
{},
saveAsImage
:
{},
},
},
series
:
[{
name
:
'
all
'
,
symbolSize
:
10
,
...
...
@@ -234,6 +283,34 @@ export default {
}],
});
},
toggleSelectZoom
(
enable
)
{
let
instance
=
this
;
setTimeout
(
function
()
{
instance
.
myChart
.
dispatchAction
({
type
:
'
takeGlobalCursor
'
,
key
:
'
dataZoomSelect
'
,
dataZoomSelectActive
:
enable
,
});
},
0
);
},
restoreChart
()
{
this
.
myChart
.
dispatchAction
({
type
:
'
restore
'
,
});
},
saveChartAsImage
()
{
let
dataUrl
=
this
.
myChart
.
getDataURL
({
pixelRatio
:
1
,
backgroundColor
:
'
#fff
'
,
});
let
fileName
=
'
embedding
'
;
let
link
=
document
.
createElement
(
'
a
'
);
link
.
download
=
fileName
;
link
.
href
=
dataUrl
;
document
.
body
.
appendChild
(
link
);
link
.
click
();
document
.
body
.
removeChild
(
link
);
},
},
};
...
...
@@ -244,4 +321,27 @@ export default {
float left
padding 10px
position relative
.visual-dl-chart-actions
opacity 0
transition: opacity .3s ease-out;
position absolute
top 4px
right 10px
img
width 30px
height 30px
position absolute
top 0
bottom 0
margin auto
.chart-toolbox-icons
width 25px
height 25px
margin-left -4px
margin-right -4px
.visual-dl-page-charts:hover
.visual-dl-chart-actions
opacity 1
</
style
>
frontend/src/scalars/ui/Chart.vue
浏览文件 @
3126b0bd
...
...
@@ -305,6 +305,7 @@ export default {
},
xAxis
:
{
type
:
'
value
'
,
name
:
this
.
horizontal
,
axisLabel
:
{
fontSize
:
'
11
'
,
},
...
...
@@ -503,6 +504,7 @@ export default {
step
:
{
xAxis
:
{
type
:
'
value
'
,
name
:
this
.
horizontal
,
axisLabel
:
{
fontSize
:
'
11
'
,
},
...
...
@@ -513,6 +515,7 @@ export default {
relative
:
{
xAxis
:
{
type
:
'
value
'
,
name
:
this
.
horizontal
,
axisLabel
:
{
fontSize
:
'
11
'
,
},
...
...
@@ -523,6 +526,7 @@ export default {
wall
:
{
xAxis
:
{
type
:
'
time
'
,
name
:
this
.
horizontal
,
axisLabel
:
{
fontSize
:
'
11
'
,
formatter
:
function
(
value
,
index
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录