本文整理汇总了Java中javafx.scene.chart.LineChart.setAnimated方法的典型用法代码示例。如果您正苦于以下问题:Java LineChart.setAnimated方法的具体用法?Java LineChart.setAnimated怎么用?Java LineChart.setAnimated使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.chart.LineChart
的用法示例。
在下文中一共展示了LineChart.setAnimated方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: showChart
import javafx.scene.chart.LineChart; //导入方法依赖的package包/类
private void showChart(LineChart chart, String name) {
chart.setCreateSymbols(false);
chart.setTitle(name);
chart.setAnimated(false);
chart.autosize();
controller.getGraphVBox().getChildren().add(chart);
}
示例3: createChartExample
import javafx.scene.chart.LineChart; //导入方法依赖的package包/类
/**
* Creates a JavaFx node example that contains a Chart
* @return
*/
@SuppressWarnings("checkstyle:magicnumber")
private Parent createChartExample() {
Parent rootNode;
//define axes
final NumberAxis xAxis = new NumberAxis();
xAxis.setLabel("Number of Month");
xAxis.setAnimated(false);
final NumberAxis yAxis = new NumberAxis();
yAxis.setLabel("Stock");
yAxis.setAnimated(false);
//creating line chart
LineChart<Number, Number> lineChart = new LineChart<Number, Number>(xAxis, yAxis);
lineChart.setTitle("Stock Monitoring, 2010");
lineChart.setAnimated(false);
//define a series
XYChart.Series<Number, Number> series = new XYChart.Series<>();
series.setName("My portfolio");
//populate the series with data
series.getData().add(new XYChart.Data<Number, Number>(1.0, 23.0));
series.getData().add(new XYChart.Data<Number, Number>(12.0, 44.0));
//add series to line chart
lineChart.getData().add(series);
rootNode = lineChart;
return rootNode;
}
示例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 Altitude Position");
lineChart.setTitle("Barometric (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 velocity");
lineChart.setTitle("Sensor-Fusion (Dynamic Velocity)");
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 Estimated Altitude Position");
lineChart.setTitle("Sensor-Fusion (Dynamic Estimated Altitude)");
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 dynamic error data");
lineChart.setTitle("Sensor-Fusion (Dynamic Error)");
return lineChart;
}
示例8: 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;
}
示例9: 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;
}
示例10: 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));
}