package com.byteowls.vaadin.chartjs;

import com.byteowls.vaadin.chartjs.config.ChartConfig;
import com.vaadin.annotations.JavaScript;
import com.vaadin.ui.AbstractJavaScriptComponent;

@JavaScript({"vaadin://chartjs/Chart.min.js", "vaadin://chartjs/chartjs-connector.js"})
public class ChartJs extends AbstractJavaScriptComponent {

    public ChartJs(ChartConfig chartConfig) {
        configure(chartConfig);
    }

    /**
     * Configure a ChartJs chart.
     *
     * @param chartConfig a chart configuration implementation
     */
    private void configure(ChartConfig chartConfig) {
        if (chartConfig != null) {
            getState().configurationJson = chartConfig.buildJson();
        }
    }

    @Override
    protected ChartJsState getState() {
        return (ChartJsState) super.getState();
    }
}

@@ -327,16 +327,88 @@
 nent %7B%0A%0A
+    private static final long serialVersionUID = 2999562112373836140L;%0A%0A
     publ
@@ -772,24 +772,567 @@
      %7D%0A    %7D
+%0A    %0A    /**%0A     * @return True if the connector's logs defined messages to %22console.log%22 else logging is disabled.%0A     */%0A    public boolean isJsLoggingEnabled() %7B%0A      return getState().loggingEnabled;%0A    %7D%0A%0A    /**%0A     * Enable or disables the connector's logging to %22console.log%22%0A     * @param jsLoggingEnabled If true the connector script will log defined messages to %22console.log%22. Defaults to false. %0A     */%0A    public void setJsLoggingEnabled(boolean jsLoggingEnabled) %7B%0A      getState().loggingEnabled = jsLoggingEnabled;%0A    %7D
 %0A%0A    @Overr

Add js logging setter/getter