Setting a Background Color for a JavaFX Chart Plot

By default, we have light and dark gray grids on the chart plot. But we can change it easily with help of CSS.

In this tutorial, we will set background colors and alternate colors for grids.

.chart-plot-background {

-fx-background-color: #e2ecfe;

}

.chart-vertical-grid-lines {

-fx-stroke: #3278fa;

}

.chart-horizontal-grid-lines {

-fx-stroke: #3278fa;

}

.chart-alternative-row-fill {

-fx-fill: #99bcfd;

}

Please check this tutorial for complete details:

 
If you find this tutorial useful, so please hit like button to let us know. You can subscribe my YouTube channel to learn more.

 

Leave a Comment