vaadin / vaadin-charts-flow

Vaadin Charts for Flow
Other
7 stars 11 forks source link

Charts does not redraw properly after LiveReload #395

Closed johannesh2 closed 4 years ago

johannesh2 commented 4 years ago

Having the code below and modifying anything so that LiveReload refreshes browser, draws a black rectangle instead of the chart changes. I need to refresh the browser manually to see the changes.

@Route
public class MainView extends VerticalLayout {

    public MainView() {
        Chart chart = new Chart(ChartType.ORGANIZATION);
        Configuration conf = chart.getConfiguration();
        conf.getChart().setInverted(true);
        conf.getChart().setHeight("500px");
        conf.getTooltip().setOutside(true);
        conf.setTitle("Acme organization chart");

        NodeSeries series = new NodeSeries();
        series.setName("Acme");
        Node acme = new Node("Acme");
        Node headOffice = new Node("Head Office");
        Node branchOffice = new Node("Branch Office");

        series.add(acme, headOffice);
        series.add(headOffice, branchOffice);
        conf.addSeries(series);

        chart.drawChart();
        add(chart);
    }

}
alvarezguille commented 4 years ago

Reproduced with 17.0.0.beta1 Seems to be fixed by https://github.com/vaadin/flow/pull/8836 Can't reproduce when overriding vaadin version to 17.0-SNAPSHOT or flow-client version to 4.0-SNAPSHOT

alvarezguille commented 4 years ago

This issue was fixed and can't be reproduced with stable version of Vaadin 17