Skip to content

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

Open
@dandedotdev

Description

@dandedotdev

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @dandedotdev

        Issue actions

          [Feature Request] An API to invert the color theme and the default color darkening of axis · Issue #681 · plotters-rs/plotters