本文整理汇总了Java中javafx.scene.chart.LineChart.setId方法的典型用法代码示例。如果您正苦于以下问题:Java LineChart.setId方法的具体用法?Java LineChart.setId怎么用?Java LineChart.setId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.chart.LineChart
的用法示例。
在下文中一共展示了LineChart.setId方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createChart
import javafx.scene.chart.LineChart; //导入方法依赖的package包/类
protected LineChart<Number, Number> createChart() {
xAxis = new NumberAxis(0,24,3);
final NumberAxis yAxis = new NumberAxis(0,100,10);
final LineChart<Number,Number> lc = new LineChart<Number,Number>(xAxis,yAxis);
// setup chart
lc.setId("lineStockDemo");
lc.setCreateSymbols(false);
lc.setAnimated(false);
lc.setLegendVisible(false);
lc.setTitle("ACME Company Stock");
xAxis.setLabel("Time");
xAxis.setForceZeroInRange(false);
yAxis.setLabel("Share Price");
yAxis.setTickLabelFormatter(new NumberAxis.DefaultFormatter(yAxis,"$",null));
// add starting data
hourDataSeries = new XYChart.Series<Number,Number>();
hourDataSeries.setName("Hourly Data");
minuteDataSeries = new XYChart.Series<Number,Number>();
minuteDataSeries.setName("Minute Data");
// create some starting data
hourDataSeries.getData().add(new XYChart.Data<Number,Number>(timeInHours,prevY));
minuteDataSeries.getData().add(new XYChart.Data<Number,Number>(timeInHours,prevY));
for (double m=0; m<(60); m++) {
nextTime();
plotTime();
}
lc.getData().add(minuteDataSeries);
lc.getData().add(hourDataSeries);
return lc;
}
示例2: initChart
import javafx.scene.chart.LineChart; //导入方法依赖的package包/类
private LineChart<Number, Number> initChart() {
// -- Chart
final LineChart<Number, Number> lineChart = new LineChart<Number, Number>(
this.xAxis, this.yAxis) {
// Override to remove symbols on each data point
@Override
protected void dataItemAdded(final Series<Number, Number> series,
final int itemIndex, final Data<Number, Number> item) {
}
};
lineChart.setAnimated(false);
lineChart.setId("Live Altitude Position");
lineChart.setTitle("Barometric (Altitude)");
return lineChart;
}
示例3: initChart
import javafx.scene.chart.LineChart; //导入方法依赖的package包/类
private LineChart<Number, Number> initChart() {
// -- Chart
final LineChart<Number, Number> lineChart = new LineChart<Number, Number>(
this.xAxis, this.yAxis) {
// Override to remove symbols on each data point
@Override
protected void dataItemAdded(final Series<Number, Number> series,
final int itemIndex, final Data<Number, Number> item) {
}
};
lineChart.setAnimated(false);
lineChart.setId("live dynamic velocity");
lineChart.setTitle("Sensor-Fusion (Dynamic Velocity)");
return lineChart;
}
示例4: initChart
import javafx.scene.chart.LineChart; //导入方法依赖的package包/类
private LineChart<Number, Number> initChart() {
// -- Chart
final LineChart<Number, Number> lineChart = new LineChart<Number, Number>(
this.xAxis, this.yAxis) {
// Override to remove symbols on each data point
@Override
protected void dataItemAdded(final Series<Number, Number> series,
final int itemIndex, final Data<Number, Number> item) {
}
};
lineChart.setAnimated(false);
lineChart.setId("Live Estimated Altitude Position");
lineChart.setTitle("Sensor-Fusion (Dynamic Estimated Altitude)");
return lineChart;
}
示例5: initChart
import javafx.scene.chart.LineChart; //导入方法依赖的package包/类
private LineChart<Number, Number> initChart() {
// -- Chart
final LineChart<Number, Number> lineChart = new LineChart<Number, Number>(
this.xAxis, this.yAxis) {
// Override to remove symbols on each data point
@Override
protected void dataItemAdded(final Series<Number, Number> series,
final int itemIndex, final Data<Number, Number> item) {
}
};
lineChart.setAnimated(false);
lineChart.setId("live dynamic error data");
lineChart.setTitle("Sensor-Fusion (Dynamic Error)");
return lineChart;
}
示例6: initChart
import javafx.scene.chart.LineChart; //导入方法依赖的package包/类
private LineChart<Number, Number> initChart() {
// -- Chart
final LineChart<Number, Number> lineChart = new LineChart<Number, Number>(
this.xAxis, this.yAxis) {
// Override to remove symbols on each data point
@Override
protected void dataItemAdded(final Series<Number, Number> series,
final int itemIndex, final Data<Number, Number> item) {
}
};
lineChart.setAnimated(false);
lineChart.setId("live acceleration");
lineChart.setTitle("Sensor-Fusion (Dynamic Acceleration)");
return lineChart;
}
示例7: initChart
import javafx.scene.chart.LineChart; //导入方法依赖的package包/类
private LineChart<Number, Number> initChart() {
// -- Chart
final LineChart<Number, Number> lineChart = new LineChart<Number, Number>(
this.xAxis, this.yAxis) {
// Override to remove symbols on each data point
@Override
protected void dataItemAdded(final Series<Number, Number> series,
final int itemIndex, final Data<Number, Number> item) {
}
};
lineChart.setAnimated(false);
lineChart.setId("Live Altitude Position");
lineChart.setTitle("Sensor-Fusion (Altitude)");
return lineChart;
}
示例8: init
import javafx.scene.chart.LineChart; //导入方法依赖的package包/类
private void init(Stage primaryStage) {
instance = this;
xAxis = new NumberAxis();
xAxis.setForceZeroInRange(false);
xAxis.setAutoRanging(true);
xAxis.setLabel("Time");
xAxis.setTickLabelsVisible(false);
xAxis.setTickMarkVisible(true);
xAxis.setMinorTickVisible(false);
yAxis = new NumberAxis();
yAxis.setAutoRanging(false);
yAxis.setForceZeroInRange(false);
//yAxis.setLowerBound(210.4);
//yAxis.setUpperBound(212);
yAxis.setLabel("Stock Price ($)");
//-- Chart
final LineChart<Number, Number> sc = new LineChart<Number, Number>(xAxis, yAxis) {
// Override to remove symbols on each data point
@Override
protected void dataItemAdded(Series<Number, Number> series, int itemIndex, Data<Number, Number> item) {
}
};
sc.setCursor(Cursor.CROSSHAIR);
sc.setAnimated(false);
sc.setId("stockChart");
// sc.setTitle("Stock Price");
//-- Chart Series
stockPriceSeries = new XYChart.Series<Number, Number>();
stockPriceSeries.setName("Last Close");
emaPriceSeries = new XYChart.Series<Number, Number>();
emaPriceSeries.setName("Med Avg");
predictionSeries = new XYChart.Series<Number, Number>();
predictionSeries.setName("Predicted Med Avg.");
sc.getData().addAll(stockPriceSeries, emaPriceSeries, predictionSeries);
sc.getStylesheets().add("style.css");
sc.applyCss();
primaryStage.setScene(new Scene(sc));
}