-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add ability to lock axes #185
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
223dee0
add ability to lock axes
M-Kusumgar 831f84c
fix tests
M-Kusumgar 8e1fc48
fix mocks
M-Kusumgar f7e4b80
fix serialiser
M-Kusumgar 900ffc9
fix more tests
M-Kusumgar e2fb85a
rich changed: log axes with lock axes behaviour + displayModeBar reve…
M-Kusumgar 5252b18
fix comment
M-Kusumgar 4ea41b5
clean diff
M-Kusumgar 335c81f
rich changed: locking only the y axis and zooming out on update if zo…
M-Kusumgar a71b1fd
rename to lock y axis
M-Kusumgar a41cbd8
fix name test
M-Kusumgar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
import { MutationTree } from "vuex"; | ||
import { GraphSettingsState } from "./state"; | ||
import { YAxisRange, GraphSettingsState } from "./state"; | ||
|
||
export enum GraphSettingsMutation { | ||
SetLogScaleYAxis = "SetLogScaleYAxis" | ||
SetLogScaleYAxis = "SetLogScaleYAxis", | ||
SetLockYAxis = "SetLockYAxis", | ||
SetYAxisRange = "SetYAxisRange" | ||
} | ||
|
||
export const mutations: MutationTree<GraphSettingsState> = { | ||
[GraphSettingsMutation.SetLogScaleYAxis](state: GraphSettingsState, payload: boolean) { | ||
state.logScaleYAxis = payload; | ||
}, | ||
|
||
[GraphSettingsMutation.SetLockYAxis](state: GraphSettingsState, payload: boolean) { | ||
state.lockYAxis = payload; | ||
}, | ||
|
||
[GraphSettingsMutation.SetYAxisRange](state: GraphSettingsState, payload: YAxisRange) { | ||
state.yAxisRange = payload; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
export type YAxisRange = [number, number] | ||
|
||
export interface GraphSettingsState { | ||
logScaleYAxis: boolean | ||
logScaleYAxis: boolean, | ||
lockYAxis: boolean, | ||
yAxisRange: YAxisRange | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this means it always does autorange if we're updating because of logScale value change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes so the log scale completely changes the axis, if you lock the axis as before there are very weird things y axis values, so instead we don't lock y axis when they toggle between the log and normal scale