VaadinCharts: ChartOptions.setLang

Hi all,

I am trying to change the loading message “Loading Chart…” to be empty or something else.

However, the below doesn’t work.

Appreciate your help,
Ahmed

    final VerticalLayout layout = new VerticalLayout();

    @Override
    protected void init(VaadinRequest request) {
        layout.setMargin(true);
        setContent(layout);

        Lang lang = new Lang();
        lang.setLoading("abbcdef");
        ChartOptions.get(this).setLang(lang);
        initUi();

    }

    private Chart initUi() {
        Chart chart = new Chart(ChartType.COLUMN);
        chart.setSizeUndefined();
        chart.setImmediate(true);
        setColumnOptions(chart);
        layout.addComponent(chart);
        return chart;
    }

    private void setColumnOptions(Chart chart) {
        Configuration conf = chart.getConfiguration();
        conf.getChart().setInverted(true);

        conf.removeyAxes();
        YAxis yAxis = new YAxis();
        yAxis.setMaxPadding(0);
        yAxis.setStartOnTick(false);
        yAxis.setEndOnTick(false);
        conf.addyAxis(yAxis);

        setSeries(chart, 35);
    }

    private void setSeries(Chart chart, int actual) {
        Configuration conf = chart.getConfiguration();
        List<Series> series = new ArrayList<Series>();
        DataSeries bufferSeries = new DataSeries();
        DataSeriesItem bufferItem = new DataSeriesItem("", actual);
        bufferSeries.add(bufferItem);
        series.add(0, bufferSeries);
        conf.setSeries(series);
        chart.drawChart();
    }

Hi,

To me your usage looks just fine. Can you file an issue to dev.vaadin.com if you coudn’t get this resolved?

cheers,
matti

Thanks, created in http://dev.vaadin.com/ticket/14741