Skip to content
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

fix: gauge behaviour #489

Merged
merged 1 commit into from
Nov 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/app/src/modules/layoutValidation.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ const validateSingleValueLayout = layout => {
export const validateLayout = layout => {
switch (layout.type) {
case VIS_TYPE_PIE:
case VIS_TYPE_GAUGE:
return validatePieLayout(layout);
case VIS_TYPE_YEAR_OVER_YEAR_COLUMN:
case VIS_TYPE_YEAR_OVER_YEAR_LINE:
return validateYearOverYearLayout(layout);
case VIS_TYPE_SINGLE_VALUE:
case VIS_TYPE_GAUGE:
return validateSingleValueLayout(layout);
default:
return validateDefaultLayout(layout);
Expand Down
6 changes: 3 additions & 3 deletions packages/app/src/modules/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ export const getAdaptedUiByType = ui => {
case VIS_TYPE_YEAR_OVER_YEAR_COLUMN: {
return yearOverYearUiAdapter(ui);
}
case VIS_TYPE_PIE:
case VIS_TYPE_GAUGE: {
case VIS_TYPE_PIE: {
return pieUiAdapter(ui);
}
case VIS_TYPE_SINGLE_VALUE: {
case VIS_TYPE_SINGLE_VALUE:
case VIS_TYPE_GAUGE: {
return singleValueUiAdapter(ui);
}
default:
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/reducers/current.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ export default (state = DEFAULT_CURRENT, action) => {
case SET_CURRENT_FROM_UI: {
switch (action.value.type) {
case VIS_TYPE_PIE:
case VIS_TYPE_GAUGE:
return getPieCurrentFromUi(state, action);
case VIS_TYPE_SINGLE_VALUE:
case VIS_TYPE_GAUGE:
return getSingleValueCurrentFromUi(state, action);
case VIS_TYPE_YEAR_OVER_YEAR_LINE:
case VIS_TYPE_YEAR_OVER_YEAR_COLUMN:
Expand All @@ -71,9 +71,9 @@ export const sGetCurrentFromUi = state => {

switch (ui.type) {
case VIS_TYPE_PIE:
case VIS_TYPE_GAUGE:
return getPieCurrentFromUi(state, { value: ui });
case VIS_TYPE_SINGLE_VALUE:
case VIS_TYPE_GAUGE:
return getSingleValueCurrentFromUi(state, { value: ui });
case VIS_TYPE_YEAR_OVER_YEAR_LINE:
case VIS_TYPE_YEAR_OVER_YEAR_COLUMN:
Expand Down