JavaFX烛台图表背景分隔符

时间:2013-05-31 20:04:12

标签: java javafx

如何摆脱背景中交替的浅灰色和白色水平分隔条?

enter image description here

1 个答案:

答案 0 :(得分:1)

明确地参见styling charts with CSS tutorial“示例8-6为图表绘制设置透明背景”。

.chart-plot-background {
  -fx-background-color: transparent;
}
.chart-alternative-row-fill {
  -fx-fill: transparent;
  -fx-stroke: transparent;
  -fx-stroke-width: 0;
}

此外:

  

通过将setAlternativeRowFillVisible(false)方法应用于JavaFX应用程序中的图表,可以使备用行不可见。