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

Refactor/chart config custom color palettes #1930

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

noahonyejese
Copy link
Contributor

@noahonyejese noahonyejese commented Dec 3, 2024

This PR:

  • This PR is meant to fully cover the refactoring of the chart config for issue Implement: Improve Color Palette #1868
  • This PR will also include migrations moving foward
  • This PR Adds. the Custom Color Picker

How to test

  1. Go to this Link
  2. Choose a Chart (ideally Einmalvergütung für Photovoltaikanlagen)
  3. Select Vertical Axis Y
  4. See new possibility to change color ✅
  5. Click on color palette icon, change the color w/ the new color picker (Input Field is still a bit weird - will be solved asap) ✅
  6. Add a Segmentation, see how here you can select different colors using the new color picker ✅
  7. Choose a Combo Chart Type (Dual Axis Line or Column-Line )
  8. Select Vertical Axis Y
  9. See how you can use custom color picker here as well ✅

@bprusinowski let me know if this is going in the right direction, note it's still heavily under construction

Copy link

vercel bot commented Dec 3, 2024

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

Name Status Preview Comments Updated (UTC)
visualization-tool ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 11, 2024 3:41pm

Copy link
Collaborator

@bprusinowski bprusinowski left a comment

Choose a reason for hiding this comment

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

Thanks @noahonyejese, it goes in the right direction, good work 👏 👨‍🎨

I added some comments, but I might also lack some context and missed some things – I know it's still a WIP, but thought it's better to raise them earlier than later 👍

app/config-types.ts Show resolved Hide resolved
app/config-types.ts Outdated Show resolved Hide resolved
app/config-types.ts Show resolved Hide resolved
app/config-types.ts Outdated Show resolved Hide resolved
app/config-types.ts Show resolved Hide resolved
app/charts/index.ts Outdated Show resolved Hide resolved
app/configurator/configurator-state/actions.tsx Outdated Show resolved Hide resolved
app/configurator/configurator-state/reducer.spec.tsx Outdated Show resolved Hide resolved
app/configurator/configurator-state/reducer.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@bprusinowski bprusinowski left a comment

Choose a reason for hiding this comment

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

Thanks @noahonyejese for tackling the feedback 🙇‍♂️

I think it would be good to make the deployment work, so the feature could be tested + add some unit tests 👍

I'd also check if "dimension" segment color type still works (you can use Forest fire danger dataset from PROD that has colors attached to dimension values), see https://visualize.admin.ch/en/create/new?cube=https://environment.ld.admin.ch/foen/gefahren-waldbrand-warnung/1&dataSource=Prod 🔥

app/charts/chart-config-ui-options.ts Outdated Show resolved Hide resolved
app/charts/chart-config-ui-options.ts Outdated Show resolved Hide resolved
app/charts/chart-config-ui-options.ts Outdated Show resolved Hide resolved
app/charts/column/columns-grouped-state.tsx Outdated Show resolved Hide resolved
app/charts/index.ts Outdated Show resolved Hide resolved
app/config-types.ts Outdated Show resolved Hide resolved
app/configurator/configurator-state/actions.tsx Outdated Show resolved Hide resolved
app/configurator/configurator-state/reducer.spec.tsx Outdated Show resolved Hide resolved
app/configurator/configurator-state/reducer.tsx Outdated Show resolved Hide resolved
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.

2 participants