当前位置: 首页>>代码示例>>Java>>正文


Java LineChart.setId方法代码示例

本文整理汇总了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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:31,代码来源:ChartAdvancedStockLine.java

示例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;
   }
 
开发者ID:knr1,项目名称:ch.bfh.mobicomp,代码行数:16,代码来源:AltitudeProfileView.java

示例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;
}
 
开发者ID:knr1,项目名称:ch.bfh.mobicomp,代码行数:16,代码来源:VelocityProfileView.java

示例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;
}
 
开发者ID:knr1,项目名称:ch.bfh.mobicomp,代码行数:16,代码来源:EstimatedAltitudeProfileView.java

示例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;
}
 
开发者ID:knr1,项目名称:ch.bfh.mobicomp,代码行数:16,代码来源:ErrorProfileView.java

示例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;
}
 
开发者ID:knr1,项目名称:ch.bfh.mobicomp,代码行数:16,代码来源:AccelerationProfileView.java

示例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;
}
 
开发者ID:knr1,项目名称:ch.bfh.mobicomp,代码行数:16,代码来源:AltitudeProfileView.java

示例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));
    }
 
开发者ID:Pivotal-Open-Source-Hub,项目名称:StockInference-Spark,代码行数:52,代码来源:FinanceUI.java


注:本文中的javafx.scene.chart.LineChart.setId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。