"...git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "daed66f7c62a184e93e975ca92850df4eb9372e3"
Commit eb0df3dc authored by Lijiao's avatar Lijiao Committed by xuehui
Browse files

Show default metric in hyper-parameter (#1200)

* Show default metric in hyper-parameter

* set default metric style in hyper-parameter
parent b83e3b3b
...@@ -145,7 +145,8 @@ class Para extends React.Component<ParaProps, ParaState> { ...@@ -145,7 +145,8 @@ class Para extends React.Component<ParaProps, ParaState> {
const parallelAxis: Array<Dimobj> = []; const parallelAxis: Array<Dimobj> = [];
// search space range and specific value [only number] // search space range and specific value [only number]
for (let i = 0; i < dimName.length; i++) { let i = 0;
for (i; i < dimName.length; i++) {
const searchKey = searchRange[dimName[i]]; const searchKey = searchRange[dimName[i]];
switch (searchKey._type) { switch (searchKey._type) {
case 'uniform': case 'uniform':
...@@ -213,6 +214,13 @@ class Para extends React.Component<ParaProps, ParaState> { ...@@ -213,6 +214,13 @@ class Para extends React.Component<ParaProps, ParaState> {
} }
} }
parallelAxis.push({
dim: i,
name: 'default metric',
nameTextStyle: {
fontWeight: 700
}
});
if (lenOfDataSource === 0) { if (lenOfDataSource === 0) {
const optionOfNull = { const optionOfNull = {
parallelAxis, parallelAxis,
...@@ -229,8 +237,8 @@ class Para extends React.Component<ParaProps, ParaState> { ...@@ -229,8 +237,8 @@ class Para extends React.Component<ParaProps, ParaState> {
const length = value.length; const length = value.length;
if (length > 16) { if (length > 16) {
const temp = value.split(''); const temp = value.split('');
for (let i = 16; i < temp.length; i += 17) { for (let m = 16; m < temp.length; m += 17) {
temp[i] += '\n'; temp[m] += '\n';
} }
return temp.join(''); return temp.join('');
} else { } else {
......
...@@ -97,6 +97,7 @@ interface Dimobj { ...@@ -97,6 +97,7 @@ interface Dimobj {
axisTick?: object; axisTick?: object;
axisLabel?: object; axisLabel?: object;
axisLine?: object; axisLine?: object;
nameTextStyle?: object;
} }
interface ParaObj { interface ParaObj {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment