org.jCharts
public final class Legend extends Object implements HTMLTestable, Serializable
Modifier and Type | Field and Description |
---|---|
private Chart |
chart |
private ArrayList |
fillPointsFlags |
private float |
height |
private float |
iconSide |
private ArrayList |
labels |
private LegendProperties |
legendProperties |
private int |
numColumns |
private int |
numRows |
private ArrayList |
paints |
private ArrayList |
pointOutlinePaints |
private ArrayList |
shapes |
private TextProcessor |
textProcessor |
private float |
widestLabelAndColumnPadding |
private float |
width |
private float |
x |
private float |
y |
Constructor and Description |
---|
Legend(Chart chart)
Deprecated.
|
Legend(Chart chart,
LegendProperties legendProperties) |
Modifier and Type | Method and Description |
---|---|
void |
calculateDrawingValues(IData iData)
Calculates the width and height needed to display the Legend.
|
void |
computeLegendXY(IAxisDataSeries iAxisDataSeries,
float chartTitleHeight) |
private void |
determineWidthAndHeight(int numberOfLabels)
Determines the dimensions needed for the Legend and creates the image for it.
|
int |
getHeight() |
LegendProperties |
getLegendProperties() |
float |
getWidth() |
private void |
processData(IAxisDataSeries iAxisDataSeries)
Central method for processing data; try to minimize looping.
|
private void |
processData(IPieChartDataSet iPieChartDataSet)
Central method for processing data; try to minimize looping.
|
private void |
processLegendLabels(IAxisPlotDataSet iAxisPlotDataSet)
Method for processing data for AxisPlot datasets; try to minimize
looping.
|
private void |
processLegendLabels(IPieChartDataSet iPieChartDataSet)
Method for processing data for PieCharts; try to minimize looping.
|
void |
render()
Renders the legend.
|
void |
setX(float x) |
void |
setY(float y) |
void |
toHTML(HTMLGenerator htmlGenerator)
Enables the testing routines to display the contents of this Object.
|
private Chart chart
private LegendProperties legendProperties
private float iconSide
private float widestLabelAndColumnPadding
private int numColumns
private int numRows
private TextProcessor textProcessor
private float x
private float y
private float width
private float height
private ArrayList labels
private ArrayList paints
private ArrayList shapes
private ArrayList fillPointsFlags
private ArrayList pointOutlinePaints
public Legend(Chart chart)
chart
- public Legend(Chart chart, LegendProperties legendProperties)
chart
- legendProperties
- public void setX(float x)
public void setY(float y)
public void computeLegendXY(IAxisDataSeries iAxisDataSeries, float chartTitleHeight)
iAxisDataSeries
- chartTitleHeight
- private void processData(IAxisDataSeries iAxisDataSeries)
iAxisDataSeries
- private void processData(IPieChartDataSet iPieChartDataSet)
iPieChartDataSet
- private void processLegendLabels(IAxisPlotDataSet iAxisPlotDataSet)
iAxisPlotDataSet
- private void processLegendLabels(IPieChartDataSet iPieChartDataSet)
iPieChartDataSet
- public LegendProperties getLegendProperties()
public void calculateDrawingValues(IData iData)
iData
- can pass either the IPieChartDataSet or the IChartDataSeries to this.public float getWidth()
public int getHeight()
private void determineWidthAndHeight(int numberOfLabels)
public void render()
public void toHTML(HTMLGenerator htmlGenerator)
toHTML
in interface HTMLTestable
htmlGenerator
-