Skip to content

Commit f88eaa0

Browse files
author
Lijun Zhang
committed
IRSA-688:
Fixed issue when reverse is selected
1 parent 5786b03 commit f88eaa0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/firefly/js/charts/ui/XYPlotPlotly.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,8 +583,12 @@ export class XYPlotPlotly extends PureComponent {
583583
// when no boundaries are changed, the block below to ensure the boundaries are kept if the boundaries IRSA-688
584584
else if( !isUndefined(params.boundaries) && shallowequal(params.boundaries, newParams.boundaries) ){
585585
layoutUpdate['xaxis.autorange'] = false;
586-
layoutUpdate['xaxis.range'] = [params.boundaries.xMin,params.boundaries.xMax];
587-
layoutUpdate['yaxis.range'] = [params.boundaries.yMin,params.boundaries.yMax];
586+
const xAxisMin = params.boundaries.xMin;
587+
const xAxisMax = params.boundaries.xMax;
588+
const yAxisMin = params.boundaries.yMin;
589+
const yAxisMax = params.boundaries.yMax;
590+
layoutUpdate['xaxis.range'] = getRange(xAxisMin, xAxisMax, newXOptions.xLog, newXOptions.xReversed); // no change for reverse here
591+
layoutUpdate['yaxis.range'] = getRange(yAxisMin, yAxisMax, newYOptions.yLog, newYOptions.yReversed); // no change for reverse here
588592

589593
}
590594

0 commit comments

Comments
 (0)