get First Series in JavaFX LineChart - Java JavaFX

Java examples for JavaFX:Chart

Description

get First Series in JavaFX LineChart

Demo Code


//package com.java2s;
import javafx.collections.ObservableList;

import javafx.scene.chart.LineChart;
import javafx.scene.chart.XYChart;

public class Main {
    public static <X, Y> ObservableList<XYChart.Data<X, Y>> getFirstSeries(
            LineChart<X, Y> chart) {
        return chart.getData().get(0).getData();
    }/*from  ww w  .  j  ava2  s.c o  m*/
}

Related Tutorials