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: Pass additional color specifications to charts #7061

Merged
merged 7 commits into from Jul 31, 2023

Conversation

mayagbarnes
Copy link
Collaborator

@mayagbarnes mayagbarnes commented Jul 21, 2023

Describe your changes

Handles column specification in altair charts by passing header defaults for fonts/colors to both default and streamlit chart themes in CustomTheme.tsx

Before:
Before

After:
Screenshot 2023-07-27 at 1 13 02 PM

GitHub Issue Link (if applicable)

Closes #3343

Testing Plan

  • E2E Tests - Snapshot tests added ✅

@mayagbarnes mayagbarnes marked this pull request as ready for review July 27, 2023 21:28
@willhuang1997
Copy link
Collaborator

Would it be sufficient to just add some headers to an already existing test and update that snapshot? Seems unnecessary to create two new tests when we are just adding some properties to customTheme.tsx imo. In addition, it would remove the barley Vega dataset and thus make the test code easier to read.

@mayagbarnes
Copy link
Collaborator Author

mayagbarnes commented Jul 28, 2023

Probably, but I haven't been able to simply add headers without disrupting the whole chart config (can't say altair charts are a strong suit I guess). Open to help on how to do so!
Alternatively I can remove the plain bar chart tests to reduce # of tests?

In the meantime going to see if I can import it from vega_datasets instead

@willhuang1997
Copy link
Collaborator

Ah yeah removing the plain barcharts sounds like a good idea

@mayagbarnes
Copy link
Collaborator Author

@willhuang1997 Could you give this another look when you have a chance 😃

@mayagbarnes mayagbarnes merged commit fa2f797 into develop Jul 31, 2023
86 checks passed
@mayagbarnes mayagbarnes deleted the feature/chart-fix branch July 31, 2023 18:16
eric-skydio pushed a commit to eric-skydio/streamlit that referenced this pull request Dec 20, 2023
Handles column specification in altair charts by passing header defaults for fonts/colors to both default and streamlit chart themes in CustomTheme.tsx
zyxue pushed a commit to zyxue/streamlit that referenced this pull request Mar 22, 2024
Handles column specification in altair charts by passing header defaults for fonts/colors to both default and streamlit chart themes in CustomTheme.tsx
zyxue pushed a commit to zyxue/streamlit that referenced this pull request Apr 16, 2024
Handles column specification in altair charts by passing header defaults for fonts/colors to both default and streamlit chart themes in CustomTheme.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some labels in Altair charts are hard to see in dark mode
3 participants