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

[Feature Request] An API to invert the color theme and the default color darkening of axis #681

Open
dandedotdev opened this issue Mar 6, 2025 · 0 comments

Comments

@dandedotdev
Copy link

What is the feature?

Hello, I'm a developer interested in developing front-end applications with Leptos and Yew. In the projects, I use Plotters to draw charts in canvas.

In front-end applications, theming is popular. We might implement the dark/light modes. Hence, if we could have an API like apply_theme, we could easily invert the colors.

(Optional) Why this feature is useful and how people would use the feature?

It's not just related to the apply_theme API I mentioned above. It's related to the default behavior of Plotters. We have axis_style to set the color of the axis, and we also have bold_line_style and light_line_style to set the color of the grid in the chart.

However, I found if I set the same color for them, the color of the axis would be darker than the grid. It's normal for the light mode, but maybe this should be inverted in the dark mode.

Image

I just took the screenshot of the example in README.

(Optional) Additional Information

Thank you for your time and attention, as well as for the effort you put into maintaining this crate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant