Skip to content

Commit

Permalink
Fixed axisConfig position select
Browse files Browse the repository at this point in the history
  • Loading branch information
cqliu1 committed Nov 14, 2019
1 parent 930c156 commit f3f67cf
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,19 @@ export class ExtendedTemplate extends PureComponent<Props> {
}

const positions = {
xaxis: [strings.getPositionBottom(), strings.getPositionTop()],
yaxis: [strings.getPositionLeft(), strings.getPositionRight()],
xaxis: [
{ value: 'bottom', text: strings.getPositionBottom() },
{ value: 'top', text: strings.getPositionTop() },
],
yaxis: [
{ value: 'left', text: strings.getPositionLeft() },
{ value: 'right', text: strings.getPositionRight() },
],
};
const argName = this.props.typeInstance.name;
const position = this.getArgValue('position', positions[argName][0]);
const position = this.getArgValue('position', positions[argName][0].value);

const options = positions[argName].map(val => ({ value: val, text: val }));
const options = positions[argName];

return (
<Fragment>
Expand Down

0 comments on commit f3f67cf

Please sign in to comment.