use of com.twosigma.beakerx.chart.xychart.XYChart in project beakerx by twosigma.
the class ChartDetails method getGraphics.
/**
* Taken from code{@code com.twosigma.beaker.groovy.rest.ChartRest#getGraphics}
*
* @param info GraphicsActionObject
* @param chart ChartDetails
* @return list of Graphics for given plot data
*/
protected List<? extends Graphics> getGraphics(GraphicsActionObject info, ChartDetails chart) {
List<? extends Graphics> graphics = null;
if (chart instanceof XYChart) {
graphics = ((XYChart) chart).getGraphics();
} else if (chart instanceof CategoryPlot) {
graphics = ((CategoryPlot) chart).getGraphics();
} else if (chart instanceof CombinedPlot) {
XYChart subplot = ((CombinedPlot) chart).getSubplots().get(((CombinedPlotActionObject) info).getSubplotIndex());
graphics = subplot.getGraphics();
}
return graphics;
}
Aggregations