use of br.com.digilabs.jqplot.elements.RendererOptions in project openmeetings by apache.
the class PollResultsDialog method barChart.
private BarChart<Integer> barChart(RoomPoll p) {
String[] ticks = getTicks(p);
BarChart<Integer> barChart = new BarChart<>(null);
barChart.addValue(Arrays.asList(getValues(p)));
barChart.getSeriesDefaults().setRendererOptions(new RendererOptions().setHighlightMouseDown(true).setShowDataLabels(true).setFill(false).setSliceMargin(4).setLineWidth(5).setBarDirection("horizontal"));
Highlighter h = new Highlighter();
h.setShow(true);
h.setFormatString("%s, %P");
h.setTooltipLocation(Location.ne);
h.setShowTooltip(true);
h.setUseAxesFormatters(false);
ChartConfiguration<Long> cfg = barChart.getChartConfiguration();
cfg.setLegend(null).setHighlighter(h);
cfg.axesInstance().setXaxis(null);
cfg.axesInstance().yAxisInstance().setTicks(ticks).setRenderer(JqPlotResources.CategoryAxisRenderer);
return barChart;
}
Aggregations