public class ChartFactoryProxy extends Object implements ChartFactory
This is open source software released under the Apache 2.0 License
| Modifier and Type | Field and Description |
|---|---|
private ChartFactory |
defaultFactory |
private ChartFactory |
htmlFactory |
private ChartFactory |
swingFactory |
| Constructor and Description |
|---|
ChartFactoryProxy()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
ChartFactory |
asHtml()
Returns the HTML based chart factory
|
ChartFactory |
asSwing()
Returns the Swing based chart factory
|
private boolean |
containsHtmlCharts(Iterable<Chart<?>> charts)
Returns true if the charts include html charts
|
private boolean |
containsSwingCharts(Iterable<Chart<?>> charts)
Returns true if the charts include swing charts
|
void |
htmlMode()
Switches this selector into HTML chart mode
|
private boolean |
isMixedCharts(Iterable<Chart<?>> charts)
Returns true if the charts are a mix of swing and html charts
|
boolean |
isSupported(Chart<?> chart)
Returns true if this factory supports the chart type specified
|
String |
javascript(Chart<?>... charts)
Returns Javascript to embed in an HTML page which will plot the charts specified.
|
String |
javascript(Iterable<Chart<?>> charts)
Returns Javascript to embed in an HTML page which will plot the charts specified.
|
<X extends Comparable,S extends Comparable> |
ofPiePlot(boolean is3d,
Consumer<Chart<PiePlot<X,S>>> configurator)
Returns a newly created Pie chart and applies it to the configurator provided
|
<X extends Comparable> |
ofXY(Class<X> domainType,
Consumer<Chart<XyPlot<X>>> configurator)
Returns a newly created XY chart and applies it to the configurator provided
|
void |
show(int columns,
Iterable<Chart<?>> charts)
Displays the collection of charts in a grid with the number of columns specified
|
void |
show(int columns,
Stream<Chart<?>> charts)
Displays the collection of charts in a grid with the number of columns specified
|
void |
swingMode()
Switches the selector into Swing chart mode
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwithAcf, withAreaPlot, withAreaPlot, withBarPlot, withBarPlot, withHistPlot, withHistPlot, withHistPlot, withLinePlot, withLinePlot, withPiePlot, withPiePlot, withPiePlot, withResidualsVsFitted, withScatterPlot, withScatterPlotprivate ChartFactory defaultFactory
private ChartFactory swingFactory
private ChartFactory htmlFactory
public void htmlMode()
public void swingMode()
public ChartFactory asHtml()
public ChartFactory asSwing()
public boolean isSupported(Chart<?> chart)
ChartFactoryisSupported in interface ChartFactorychart - the chart instancepublic String javascript(Chart<?>... charts)
ChartFactorydiv elements which
have attributes labelled "chart_N" where N is 0, 1, 2, N. The first chart
in the arguments will be plotted in div with id=chart_0, the second will be plotted in the
div with id=chart_1 and so on. javascript in interface ChartFactorycharts - the sequence of charts to generate Javascript frompublic String javascript(Iterable<Chart<?>> charts)
ChartFactorydiv elements which
have attributes labelled "chart_N" where N is 0, 1, 2, N. The first chart
in the arguments will be plotted in div with id=chart_0, the second will be plotted in the
div with id=chart_1 and so on. javascript in interface ChartFactorycharts - the sequence of charts to generate Javascript frompublic void show(int columns,
Iterable<Chart<?>> charts)
ChartFactoryshow in interface ChartFactorycolumns - the number of columns for chart gridcharts - the sequence of charts to plotpublic void show(int columns,
Stream<Chart<?>> charts)
ChartFactoryshow in interface ChartFactorycolumns - the number of columns for chart gridcharts - the sequence of charts to plotpublic <X extends Comparable> Chart<XyPlot<X>> ofXY(Class<X> domainType, Consumer<Chart<XyPlot<X>>> configurator)
ChartFactoryofXY in interface ChartFactoryX - the domain key typedomainType - the data type for the domain axisconfigurator - the chart configuratorpublic <X extends Comparable,S extends Comparable> Chart<PiePlot<X,S>> ofPiePlot(boolean is3d, Consumer<Chart<PiePlot<X,S>>> configurator)
ChartFactoryofPiePlot in interface ChartFactoryX - the item key typeis3d - true for a 3d plotconfigurator - the chart configuratorprivate boolean isMixedCharts(Iterable<Chart<?>> charts)
charts - the iterable of chartsprivate boolean containsHtmlCharts(Iterable<Chart<?>> charts)
charts - the iterable of chartsCopyright 2014-2017, Xavier Witdouck