Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Rename x-axis label of Intermediate result "#Intermediate result" (#2146
Browse files Browse the repository at this point in the history
)

* rename intermediate graph xAxis name

* rename intermediate name

* code format

* rename class name

Co-authored-by: Lijiao <15910218274@163.com>
  • Loading branch information
Lijiaoa and lvybriage authored Mar 17, 2020
1 parent ae0d36f commit e9f5464
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/webui/src/components/trial-detail/Intermediate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ class Intermediate extends React.Component<IntermediateProps, IntermediateState>
notMerge={true} // update now
onEvents={IntermediateEvents}
/>
<div className="yAxis"># Intermediate result</div>
<div className="xAxis"># Intermediate result</div>
</div>
</div>
);
Expand Down
25 changes: 14 additions & 11 deletions src/webui/src/components/trial-detail/TableList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ class TableList extends React.Component<TableListProps, TableListState> {
if (res.data.length !== 0) {
// just add type=number keys
const intermediateMetrics = parseMetrics(res.data[0].data);
for(const key in intermediateMetrics){
if(typeof intermediateMetrics[key] === 'number') {
for (const key in intermediateMetrics) {
if (typeof intermediateMetrics[key] === 'number') {
otherkeys.push(key);
}
}
Expand Down Expand Up @@ -622,15 +622,18 @@ class TableList extends React.Component<TableListProps, TableListState> {
:
null
}
<ReactEcharts
option={intermediateOption}
style={{
width: 0.5 * modalIntermediateWidth,
height: 0.7 * modalIntermediateHeight,
padding: 20
}}
theme="my_theme"
/>
<div className="intermediate-graph">
<ReactEcharts
option={intermediateOption}
style={{
width: 0.5 * modalIntermediateWidth,
height: 0.7 * modalIntermediateHeight,
padding: 20
}}
theme="my_theme"
/>
<div className="xAxis">#Intermediate result</div>
</div>
</Modal>
{/* Add Column Modal */}
{
Expand Down
2 changes: 1 addition & 1 deletion src/webui/src/static/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const intermediateGraphOption = (intermediateArr: number[], id: string): any =>
trigger: 'item'
},
xAxis: {
name: 'Trial',
// name: '#Intermediate result',
data: sequence
},
yAxis: {
Expand Down
2 changes: 1 addition & 1 deletion src/webui/src/static/style/trialsDetail.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ $bg: #b3b3b3;
/* for yAxis # intermediate position in intermediate graph*/
.intermediate-graph{
position: relative;
.yAxis{
.xAxis{
color: #333;
position: absolute;
left: 50%;
Expand Down

0 comments on commit e9f5464

Please sign in to comment.