Skip to content

Commit

Permalink
fix: Locked Axis resets when manual points chosen (PT-187790534)
Browse files Browse the repository at this point in the history
  • Loading branch information
emcelroy committed Jun 28, 2024
1 parent 2484f7f commit 5712be7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugins/graph/models/graph-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ export class GraphController {
attrType = dataConfiguration.attributeType(attrRole) ?? 'empty',
currAxisModel = graphModel.getAxis(place),
currentType = currAxisModel?.type ?? 'empty',
[min, max] = kDefaultNumericAxisBounds;
[min, max] = graphModel.lockAxes && isNumericAxisModel(currAxisModel)
? [currAxisModel.min, currAxisModel.max]
: kDefaultNumericAxisBounds;

Check warning on line 158 in src/plugins/graph/models/graph-controller.ts

View check run for this annotation

Codecov / codecov/patch

src/plugins/graph/models/graph-controller.ts#L157-L158

Added lines #L157 - L158 were not covered by tests
switch (attrType) {
case 'numeric': {
if (!currAxisModel || !isNumericAxisModel(currAxisModel)) {
Expand Down

0 comments on commit 5712be7

Please sign in to comment.