I have an application that displays several Line Charts with several Series like this:
I'd like to change the color of each Series but haven't found a way to achieve this. The only thing I found is how to change the default colors but that doesn't solve my problem.
Is there really now way to achieve individual colors for chart series?

The JavaFX CSS Reference Guide says the following for
LineChart:Note: Although the line is only documented as a
Node, by default it is actually ajavafx.scene.shape.Path.If you want to target a specific series' line, use
.chart-series-line.series<i>, where<i>is replaced with the index of the series in the chart's data. And if you want to give a series of a specific chart a certain color, then simply give the chart an ID and use that in the CSS selector.Here's an example. It uses so-called looked-up colors, which makes the CSS a little more scalable and organized. Also, they can have their values changed via the
setStylemethod in code, allowing you to dynamically change the color programmatically. Another approach for that is to use a "data URL", showcased in this other Stack Overflow answer.style.css:
Main.java: