Skip to content

Conversation

@HerbertsVaadin
Copy link
Contributor

Solves:
#4782
#76 (sort of)

Changes:

  • Rewrote CSS Styling example to work and match V24 approach.
  • Created a new example about styling through Java API
  • Renamed Tab to "Chart Styling" instead of "CSS Styling"
  • Removed second CSS example, as it was not working (and not necessary in my opinion).
  • Included in the examples the changing of the series / line colors as well.

@HerbertsVaadin HerbertsVaadin changed the title Fix broken charts examples, add Flow API example Fix broken charts styling examples, add Flow API example Nov 19, 2025
@github-actions
Copy link

AI Language Review

The update to the file has introduced a clear example of Java API styling for charts and expanded the CSS styling example in a meaningful way. However, the example for Java API includes a comment with the phrase "Point inside color," which is inconsistent with the rest of the comments in the example that use less conversational phrasing, like "Line color" or "Point outline color." It would be better to replace it with "Point fill color" for consistency. Additionally, ensure that all code snippets and descriptions maintain a consistent use of punctuation, such as periods at the end of statements.

@peholmst peholmst requested a review from rolfsmeds December 16, 2025 14:27
@peholmst
Copy link
Member

This PR is targeted at Vaadin 24. Does it apply to Vaadin 25 as well?

@rolfsmeds
Copy link
Contributor

This PR is targeted at Vaadin 24. Does it apply to Vaadin 25 as well?

Yes, it's equally applicable to V25. However, in the V25 docs, we need to mention that you need to enable shadow DOM style injection to use it. There is a note in the V25 Styling section about that: https://github.com/vaadin/docs/blob/main/articles/styling/index.adoc

Copy link
Contributor

@rolfsmeds rolfsmeds left a comment

Choose a reason for hiding this comment

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

More of a question than a request to change... otherwise looks good to me.
Would be great to port to V25 docs (where it also needs to be noted that component shadow DOM css styling needs to be enabled)



[[css.styling.example2]]
== Exposing Chart Elements for Styling (Flow)
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't the only problem with this example that the css snippet is wrong (in that it needs to be applied to components/vaadin-chart.css?

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.

4 participants