I was looking for a 'free alternative to Vaadin Charts and found DCharts Widget, but I can not find guides or complete documentation to' use. Does anyone know how to import and use this widget? The guides to get started?
To use dCharts i have execute this step:
Small exemple of code:
final VerticalLayout layout = new VerticalLayout();
DataSeries dataSeries = new DataSeries()
.add(1, 5, 8, 2, 3);
SeriesDefaults seriesDefaults = new SeriesDefaults()
.setRenderer(SeriesRenderers.BAR);
Axes axes = new Axes()
.addAxis(
new XYaxis().setRenderer(AxisRenderers.CATEGORY)
.setTicks(new Ticks()
.add("a", "b", "c", "d", "e")));
Highlighter highlighter = new Highlighter()
.setShow(false);
Options options = new Options()
.setSeriesDefaults(seriesDefaults)
.setAxes(axes)
.setHighlighter(highlighter);
DCharts chart = new DCharts()
.setDataSeries(dataSeries)
.setOptions(options)
.show();
layout.addComponent(chart);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.