You might look at JDBCXYDataset
, which can detect a time series based on metadata. As noted in the API, "The first column will be the x-axis and remaining columns y-axis values." Click on the class name to see the corresponding source, for example.
Addendum: If you don't want to use JDBCXYDataset
directly with a JDBC query, it may be a useful outline of how to extend AbstractXYDataset
to create a dataset based on a corresponding JPA query.
class JpaXYDtaset extends AbstractXYDataset {
// implement required methods using JPA query results
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…