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] Add reverse_color argument to kpi_card_reference #995

Merged
merged 29 commits into from
Feb 5, 2025

Conversation

huong-li-nguyen
Copy link
Contributor

@huong-li-nguyen huong-li-nguyen commented Feb 5, 2025

Description

When we initially created the KPI card functions, we were already thinking about incorporating the reverse_color argument. Back then we decided to keep the API small and see whether it's even requested.

It has been recently requested and is actually fairly simple to implement, so we've decided to introduce the argument now. See #976 for context.

Screenshot

Notice

  • I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

    • I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.
    • I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorized to submit this contribution on behalf of the original creator(s) or their licensees.
    • I certify that the use of this contribution as authorized by the Apache 2.0 license does not violate the intellectual property rights of anyone else.
    • I have not referenced individuals, products or companies in any commits, directly or indirectly.
    • I have not added data or restricted code in any commits, directly or indirectly.

Copy link
Contributor

github-actions bot commented Feb 5, 2025

View the example dashboards of the current commit live on PyCafe ☕ 🚀

Updated on: 2025-02-05 14:50:00 UTC
Commit: 46dafe1

Link: vizro-core/examples/dev/

Link: vizro-core/examples/scratch_dev

Link: vizro-core/examples/visual-vocabulary/

Link: vizro-ai/examples/dashboard_ui/

@huong-li-nguyen huong-li-nguyen self-assigned this Feb 5, 2025
@huong-li-nguyen huong-li-nguyen changed the title Feat/extend kpi card [Feat] Add reverse_color argument to kpi_card_reference Feb 5, 2025
@huong-li-nguyen huong-li-nguyen marked this pull request as ready for review February 5, 2025 11:40
Copy link
Contributor

@petar-qb petar-qb left a comment

Choose a reason for hiding this comment

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

I enjoy reviewing your PRs 😄. This looks perfect!

vizro-core/src/vizro/figures/_kpi_cards.py Outdated Show resolved Hide resolved
Copy link
Contributor

@antonymilne antonymilne left a comment

Choose a reason for hiding this comment

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

Perfect! 💯

Should @l0uden update his tests to include this? I think he may have tests for KPI cards as components in a pure Dash app and within vizro.

vizro-core/src/vizro/figures/_kpi_cards.py Outdated Show resolved Hide resolved
@huong-li-nguyen
Copy link
Contributor Author

huong-li-nguyen commented Feb 5, 2025

Perfect! 💯

Should @l0uden update his tests to include this? I think he may have tests for KPI cards as components in a pure Dash app and within vizro.

I can just extend his tests 👍 Give me a sec, will update the screenshots as well.

@huong-li-nguyen huong-li-nguyen enabled auto-merge (squash) February 5, 2025 14:49
@huong-li-nguyen huong-li-nguyen merged commit a554f25 into main Feb 5, 2025
36 checks passed
@huong-li-nguyen huong-li-nguyen deleted the feat/extend-kpi-card branch February 5, 2025 14:52
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.

Add option to customize highlighting of positive and negative changes in the KPI card
3 participants