如何为折线图做CSS

时间:2015-04-20 06:55:35

标签: java css javafx

我有两个折线图,其中一个折线图我想删除系列线,所以我试着用这种方式,

#rffLineChart.default-color0.chart-series-line { -fx-stroke: transparent; }

#rffLineChart.default-color0.chart-line-symbol { 
-fx-background-color: white, red; 
}
CSS上面的

无效。告诉我正确的CSS的方法

下面是.fxml文件 更新的

 <?xml version="1.0" encoding="UTF-8"?>
 <?import java.lang.*?>
 <?import java.util.*?>
 <?import javafx.scene.*?>
 <?import javafx.scene.chart.*?>
 <?import javafx.scene.control.*?>
 <?import javafx.scene.layout.*?>

 <AnchorPane id="AnchorPane" prefHeight="917.0" prefWidth="895.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/2.2" fx:controller="linechartapp.FXMLDocumentController">
   <children>
     <LineChart fx:id="lineChart" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="41.0" AnchorPane.topAnchor="14.0">
  <xAxis>
    <NumberAxis fx:id="xAxis" autoRanging="false" side="BOTTOM" upperBound="1600.0" />
  </xAxis>
  <yAxis>
    <NumberAxis fx:id="yAxis" autoRanging="false" lowerBound="-130.0" side="LEFT" upperBound="30.0" />
  </yAxis>
</LineChart>
<Button fx:id="btnLoad" layoutX="396.0" layoutY="866.0" mnemonicParsing="false" onAction="#handleButtonAction" text="Load Data" />
<Button fx:id="btnClear" layoutX="501.0" layoutY="867.0" mnemonicParsing="false" onAction="#handleButtonAction" prefWidth="55.0" text="Clear" />
<LineChart fx:id="rffLineChart" layoutY="436.0" prefWidth="840.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="41.0">
  <xAxis>
    <NumberAxis fx:id="rffXAxis" autoRanging="false" side="BOTTOM" upperBound="1600.0" />
  </xAxis>
  <yAxis>
    <NumberAxis fx:id="rffYAxis" autoRanging="false" lowerBound="-130.0" side="LEFT" upperBound="30.0" />
  </yAxis>
</LineChart>
   </children>
 </AnchorPane>

0 个答案:

没有答案
相关问题