Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
My Invient Chart is not being displaying.
Hi all,
I'm unable to display invient chart in the liferay console.Please suggest me in doing this.Please.This is my code.
public void init() {
{
InvientChartsConfig chartConfig = new InvientChartsConfig();
chartConfig.getGeneralChartConfig().setType(SeriesType.COLUMN);
chartConfig.getTitle().setText("Monthly Average Rainfall");
chartConfig.getSubtitle().setText("Source: WorldClimate.com");
CategoryAxis xAxis = new CategoryAxis();
xAxis.setCategories(Arrays.asList("Jan", "Feb", "Mar", "Apr", "May",
"Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"));
LinkedHashSet<XAxis> xAxesSet = new LinkedHashSet<InvientChartsConfig.XAxis>();
xAxesSet.add(xAxis);
chartConfig.setXAxes(xAxesSet);
NumberYAxis yAxis = new NumberYAxis();
yAxis.setMin(0.0);
yAxis.setTitle(new AxisTitle("Rainfall (mm)"));
LinkedHashSet<YAxis> yAxesSet = new LinkedHashSet<InvientChartsConfig.YAxis>();
chartConfig.setYAxes(yAxesSet);
Legend legend = new Legend();
legend.setFloating(true);
legend.setLayout(com.invient.vaadin.charts.InvientChartsConfig.Legend.Layout.VERTICAL);
legend.setPosition(new Position());
legend.getPosition().setAlign(HorzAlign.LEFT);
legend.getPosition().setVertAlign(VertAlign.TOP);
legend.getPosition().setX(100);
legend.getPosition().setY(70);
legend.setShadow(true);
legend.setBackgroundColor(new RGB(255, 255, 255));
chartConfig.setLegend(legend);
chartConfig.getTooltip().setFormatterJsFunc(
"function() {" + " return '' + this.x +': '+ this.y +' mm'; "
+ "}");
com.invient.vaadin.charts.InvientChartsConfig.ColumnConfig colCfg = new com.invient.vaadin.charts.InvientChartsConfig.ColumnConfig();
colCfg.setPointPadding(0.2);
colCfg.setBorderWidth(100);
colCfg.setBorderColor(new RGB(0, 0, 0));
chartConfig.addSeriesConfig(colCfg);
InvientCharts chart = new InvientCharts(chartConfig);
XYSeries seriesData = new XYSeries("Tokyo");
seriesData.setSeriesPoints(getPoints(seriesData, 49.9, 71.5, 106.4,
129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4));
chart.addSeries(seriesData);
seriesData = new XYSeries("New York");
seriesData.setSeriesPoints(getPoints(seriesData, 83.6, 78.8, 98.5,
93.4, 106.0, 84.5, 105.0, 104.3, 91.2, 83.5, 106.6, 92.3));
chart.addSeries(seriesData);
seriesData = new XYSeries("London");
seriesData.setSeriesPoints(getPoints(seriesData, 48.9, 38.8, 39.3,
41.4, 47.0, 48.3, 59.0, 59.6, 52.4, 65.2, 59.3, 51.2));
chart.addSeries(seriesData);
seriesData = new XYSeries("Berlin");
seriesData.setSeriesPoints(getPoints(seriesData, 42.4, 33.2, 34.5,
39.7, 52.6, 75.5, 57.4, 60.4, 47.6, 39.1, 46.8, 51.1));
chart.addSeries(seriesData);
Window mainWindow = new Window("Prueba10 Application");
System.out.println("Before");
mainWindow.addComponent(chart);
System.out.println("after");
setMainWindow(mainWindow);
}
}
private static LinkedHashSet<DecimalPoint> getPoints(Series series,
double... values) {
LinkedHashSet<DecimalPoint> points = new LinkedHashSet<DecimalPoint>();
for (double value : values) {
points.add(new DecimalPoint(series, value));
}
return points;
}
I'm getting no output in liferay console..It is displaying blank window
}
My project is too.Please suggest me
Thank you very much.