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

feat: Refinements to table column styles #809

Merged
merged 4 commits into from
Oct 27, 2022

Conversation

bprusinowski
Copy link
Collaborator

@bprusinowski bprusinowski commented Oct 27, 2022

Closes #808.

Previously we incorrectly enabled bar and heat map column style options for some dimension types; this PR improves that by enabling them only for numerical measures and allowing to use categories for other dimension types. It also moves a placeholder text "Select a dimension" to top, instead of being the last option.

Additionally, there is now a "dimension" color palette, which exists when there are pre-defined colors attached to dimension values; we are then able to select such palette from ColorPalette picker.

How to test

  1. Go to /en/browse/dataset/https%3A%2F%2Fenvironment.ld.admin.ch%2Ffoen%2Ftest_ordinal_507%2F7?dataSource=Int
  2. Select ord1 dimension in Columns section.
  3. Change column style to Categories.
  4. See that the values are colored according to custom dimension colors.
  5. See that it's possible to change the default color palette to different palettes.

@vercel
Copy link

vercel bot commented Oct 27, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
visualization-tool ✅ Ready (Inspect) Visit Preview Oct 27, 2022 at 11:16AM (UTC)

Copy link
Collaborator

@ptbrowne ptbrowne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool change, some remarks but overall LGTM :)

app/charts/table/table-state.tsx Outdated Show resolved Hide resolved
app/charts/index.ts Outdated Show resolved Hide resolved
app/charts/shared/colors.tsx Outdated Show resolved Hide resolved
app/charts/index.ts Outdated Show resolved Hide resolved
...bar & heatmap only for numerical measures, categories for other dimensions
@bprusinowski bprusinowski force-pushed the feat/refinements-to-tables branch from a166c0f to 65daecb Compare October 27, 2022 11:07
@bprusinowski bprusinowski merged commit 903f733 into main Oct 27, 2022
@bprusinowski bprusinowski deleted the feat/refinements-to-tables branch October 27, 2022 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancements to table view for ordinal scales
2 participants