提交 2a24ffd6 编写于 作者: P ph

update histogram

上级 fe3b7843
...@@ -46,8 +46,9 @@ ...@@ -46,8 +46,9 @@
"modelSize": "模型大小", "modelSize": "模型大小",
"dataProcess": "数据处理", "dataProcess": "数据处理",
"noDataFound":"暂无满足筛选条件的数据", "noDataFound":"暂无满足筛选条件的数据",
"noDataTips":"请点击“显示全量数据”按钮查看全量数据" "noDataTips":"请点击“显示全量数据”按钮查看全量数据",
"userDefined": "自定义数据",
"metric": "度量指标"
}, },
"dataTraceback": { "dataTraceback": {
"details": "详情", "details": "详情",
...@@ -102,21 +103,21 @@ ...@@ -102,21 +103,21 @@
}, },
"histogram": { "histogram": {
"titleText": "参数分布图", "titleText": "参数分布图",
"xAxisTitle": "水平轴", "xAxisTitle": "轴",
"viewType": "直方图模式", "viewType": "视角",
"centerValue": "中心值", "centerValue": "中心值",
"step": "步骤", "step": "步骤",
"relativeTime": "相对时间", "relativeTime": "相对时间",
"absoluteTime": "绝对时间", "absoluteTime": "绝对时间",
"overlay": "覆盖", "overlay": "正视",
"offset": "偏移", "offset": "俯视",
"fullScreen": "切换全屏" "fullScreen": "切换全屏"
}, },
"dataMap": { "dataMap": {
"titleText": "数据图可视" "titleText": "数据图"
}, },
"graph": { "graph": {
"titleText": "计算图可视", "titleText": "计算图",
"downloadPic": "下载", "downloadPic": "下载",
"nodeInfo": "节点信息", "nodeInfo": "节点信息",
"legend": "图例", "legend": "图例",
......
...@@ -51,15 +51,15 @@ limitations under the License. ...@@ -51,15 +51,15 @@ limitations under the License.
</div> </div>
</div> </div>
<div class="cl-dashboard-con-up" <div class="cl-dashboard-con-up"
:class="!!histogramTag ? '' : 'no-data-hover'" :class="!!histogramTag && !wrongPlugin ? '' : 'no-data-hover'"
@click="viewMoreHistogram"> @click="viewMoreHistogram">
<div class="cl-dashboard-title">{{$t("histogram.titleText")}}</div> <div class="cl-dashboard-title">{{$t("histogram.titleText")}}</div>
<div class="cl-module"> <div class="cl-module">
<div id="distribution-chart" <div id="distribution-chart"
v-show="!!histogramTag"></div> v-show="!!histogramTag && !wrongPlugin"></div>
<div class="no-data-img" <div class="no-data-img"
key="no-chart-data" key="no-chart-data"
v-show="!histogramTag"> v-show="!histogramTag || wrongPlugin">
<img :src="require('@/assets/images/nodata.png')" <img :src="require('@/assets/images/nodata.png')"
alt="" /> alt="" />
<p class='no-data-text'> <p class='no-data-text'>
...@@ -769,15 +769,18 @@ export default { ...@@ -769,15 +769,18 @@ export default {
if (!tagList) { if (!tagList) {
return; return;
} }
let histogramTag = '';
if (!this.histogramTag || tagList.indexOf(this.histogramTag) === -1) { if (!this.histogramTag || tagList.indexOf(this.histogramTag) === -1) {
this.histogramTag = tagList[0] || ''; histogramTag = tagList[0] || '';
} else {
histogramTag = this.histogramTag;
} }
if (!this.histogramTag) { if (!histogramTag) {
return; return;
} }
const params = { const params = {
train_id: this.trainingJobId, train_id: this.trainingJobId,
tag: this.histogramTag, tag: histogramTag,
}; };
// tag // tag
RequestService.getHistogramData(params).then((res) => { RequestService.getHistogramData(params).then((res) => {
...@@ -790,6 +793,7 @@ export default { ...@@ -790,6 +793,7 @@ export default {
return; return;
} }
const data = res.data; const data = res.data;
this.histogramTag = histogramTag;
this.histogramData = this.formOriData(data); this.histogramData = this.formOriData(data);
const charOption = this.formatDataToChar(); const charOption = this.formatDataToChar();
this.updateHistogramSampleData(charOption); this.updateHistogramSampleData(charOption);
...@@ -873,7 +877,7 @@ export default { ...@@ -873,7 +877,7 @@ export default {
textStyle: {fontFamily: 'Merriweather Sans'}, textStyle: {fontFamily: 'Merriweather Sans'},
title: { title: {
text: charOption.title || '', text: charOption.title || '',
textStyle: {fontSize: '16', fontWeight: '600'}, textStyle: {fontSize: '12', fontWeight: '400'},
bottom: 6, bottom: 6,
left: 'center', left: 'center',
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册