Example usage for org.jfree.chart.entity LegendItemEntity setDataset

List of usage examples for org.jfree.chart.entity LegendItemEntity setDataset

Introduction

In this page you can find the example usage for org.jfree.chart.entity LegendItemEntity setDataset.

Prototype

public void setDataset(Dataset dataset) 

Source Link

Document

Sets a reference to the dataset that this legend item is derived from.

Usage

From source file:ec.util.chart.swing.Charts.java

@Nonnull
public static LegendItemEntity createFakeLegendItemEntity(XYDataset dataset, Comparable<?> seriesKey) {
    LegendItemEntity result = new LegendItemEntity(new Area());
    result.setDataset(dataset);
    result.setSeriesKey(seriesKey);//from w  ww . j  a  va 2s.  c o m
    return result;
}