Skip to content

Commit 5786b03

Browse files
author
Lijun Zhang
committed
IRSA-688:
Fixed the axis range bug when restyle to grid
1 parent a050a1b commit 5786b03

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

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

584592
if (!shallowequal(params.selection, newParams.selection)) {
585593
if (newParams.selection) {

0 commit comments

Comments
 (0)