Package com.invient.vaadin.charts.widgetset.client.ui.GwtInvientChartsConfig

Examples of com.invient.vaadin.charts.widgetset.client.ui.GwtInvientChartsConfig.GwtChartOptions


    // Set chart size
    private void setChartSize(UIDL optionsUIDL) {
        // There is not need to set redrawChart flag as setting title & subtitle
        // does not require redrawing of the chart.
        GwtChartOptions chartOptions = getChartOptions(optionsUIDL
                .getChildUIDL(ChartOptionsUIDLIndex.CHART_CONFIG.ordinal()));
        int newWidth = chartOptions.getWidth();
        int newHeight = chartOptions.getHeight();
        int existingWidth = chart.getOptions().getChartOptions().getWidth();
        int existingHeight = chart.getOptions().getChartOptions().getHeight();

        if ((newWidth != -1 && newWidth != existingWidth)
                || (newHeight != -1 && newHeight != existingHeight)) {
View Full Code Here


    private GwtChartOptions getChartOptions(UIDL uidl) {
        VConsole.log("Enter [getChartOptions]");
        VConsole.log("Tag Name : " + uidl.getTag());

        GwtChartOptions chartOptions = GwtChartOptions.create();
        // DIV - A container for the InvientChart
        chartOptions.setRenderTo(super.divId);

        if (uidl.hasAttribute("type")) {
            chartOptions.setType(uidl.getStringAttribute("type"));
        }
        if (uidl.hasAttribute("width")) {
            chartOptions.setWidth(uidl.getIntAttribute("width"));
        }
        if (uidl.hasAttribute("height")) {
            chartOptions.setHeight(uidl.getIntAttribute("height"));
        }
        if (uidl.hasAttribute("backgroundColor")) {
            chartOptions.setBackgroundColor(uidl
                    .getStringAttribute("backgroundColor"));
        }
        if (uidl.hasAttribute("borderColor")) {
            chartOptions.setBorderColor(uidl.getStringAttribute("borderColor"));
        }
        if (uidl.hasAttribute("borderRadius")) {
            chartOptions.setBorderRadius(uidl.getIntAttribute("borderRadius"));
        }
        if (uidl.hasAttribute("borderWidth")) {
            chartOptions.setBorderWidth(uidl.getIntAttribute("borderWidth"));
        }
        if (uidl.hasAttribute("ignoreHiddenSeries")) {
            chartOptions.setIgnoreHiddenSeries(uidl
                    .getBooleanAttribute("ignoreHiddenSeries"));
        }
        if (uidl.hasAttribute("inverted")) {
            chartOptions.setInverted(uidl.getBooleanAttribute("inverted"));
        }
        if (uidl.hasAttribute("marginTop")) {
            chartOptions.setMarginTop(uidl.getIntAttribute("marginTop"));
        }
        if (uidl.hasAttribute("marginLeft")) {
            chartOptions.setMarginLeft(uidl.getIntAttribute("marginLeft"));
        }
        if (uidl.hasAttribute("marginRight")) {
            chartOptions.setMarginRight(uidl.getIntAttribute("marginRight"));
        }
        if (uidl.hasAttribute("marginBottom")) {
            chartOptions.setMarginBottom(uidl.getIntAttribute("marginBottom"));
        }
        if (uidl.hasAttribute("spacingTop")) {
            chartOptions.setSpacingTop(uidl.getIntAttribute("spacingTop"));
        }
        if (uidl.hasAttribute("spacingLeft")) {
            chartOptions.setSpacingLeft(uidl.getIntAttribute("spacingLeft"));
        }
        if (uidl.hasAttribute("spacingRight")) {
            chartOptions.setSpacingRight(uidl.getIntAttribute("spacingRight"));
        }
        if (uidl.hasAttribute("spacingBottom")) {
            chartOptions
                    .setSpacingBottom(uidl.getIntAttribute("spacingBottom"));
        }
        if (uidl.hasAttribute("showAxes")) {
            chartOptions.setShowAxes(uidl.getBooleanAttribute("showAxes"));
        }
        if (uidl.hasAttribute("zoomType")) {
            chartOptions.setZoomType(uidl.getStringAttribute("zoomType"));
        }
        if (uidl.hasAttribute("clientZoom")) {
            chartOptions.setClientZoom(uidl.getBooleanAttribute("clientZoom"));
        }

        if (uidl.hasAttribute("alignTicks")) {
            chartOptions.setAlignTicks(uidl.getBooleanAttribute("alignTicks"));
        }
        if (uidl.hasAttribute("animation")) {
            chartOptions.setAnimation(uidl.getBooleanAttribute("animation"));
        }
        if (uidl.hasAttribute("className")) {
            chartOptions.setClassName(uidl.getStringAttribute("className"));
        }
        if (uidl.hasAttribute("plotBackgroundColor")) {
            chartOptions.setPlotBackgroundColor(uidl
                    .getStringAttribute("plotBackgroundColor"));
        }
        if (uidl.hasAttribute("plotBorderColor")) {
            chartOptions.setPlotBorderColor(uidl
                    .getStringAttribute("plotBorderColor"));
        }
        if (uidl.hasAttribute("plotBackgroundImage")) {
            chartOptions.setPlotBackgroundImage(uidl
                    .getStringAttribute("plotBackgroundImage"));
        }
        if (uidl.hasAttribute("plotBorderWidth")) {
            chartOptions.setPlotBorderWidth(uidl
                    .getIntAttribute("plotBorderWidth"));
        }
        if (uidl.hasAttribute("plotShadow")) {
            chartOptions.setPlotShadow(uidl.getBooleanAttribute("plotShadow"));
        }
        if (uidl.hasAttribute("reflow")) {
            chartOptions.setReflow(uidl.getBooleanAttribute("reflow"));
        }
        if (uidl.hasAttribute("shadow")) {
            chartOptions.setShadow(uidl.getBooleanAttribute("shadow"));
        }
        if (uidl.hasAttribute("style")) {
            chartOptions.setStyle(uidl.getStringAttribute("style"));
        }

        VConsole.log("Exit [getChartOptions]");
        return chartOptions;
    }
View Full Code Here

TOP

Related Classes of com.invient.vaadin.charts.widgetset.client.ui.GwtInvientChartsConfig.GwtChartOptions

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.