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

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


            setRedrawChart();
            JsArray<GwtSeriesDataOptions> uidlChartDataArr = getChartData(
                    uidlChartData, seriesToUpdate);
            for (int ind = 0; ind < seriesToUpdateList.size(); ind++) {
                UIDL uidlSeriesToUpdate = seriesToUpdateList.get(ind);
                GwtSeriesDataOptions uidlSeriesDataOptions = uidlChartDataArr
                        .get(ind);
                GwtSeries chartSeries = chart.getSeries(uidlSeriesDataOptions
                        .getName());
                GwtSeriesGeneralOptions chartSeriesOptions = chartSeries
                        .getSeriesGeneralOptions();
                GwtSeriesGeneralOptions uidlSeriesOptions = uidlSeriesDataOptions
                        .getSeriesOptions();
                // Update visibility
                boolean isVisible = (uidlSeriesOptions != null
                        && uidlSeriesOptions.isVisible() != null ? uidlSeriesOptions
                        .isVisible() : true);
                chartSeriesOptions.setVisible(isVisible);
                if (chartSeriesOptions.isVisible() == true
                        && chartSeries.isVisible() == false) {
                    chartSeries.show();
                }
                if (chartSeriesOptions.isVisible() == false
                        && chartSeries.isVisible() == true) {
                    chartSeries.hide();
                }
                // Update points
                if (uidlSeriesToUpdate.getBooleanAttribute("isReloadPoints")) {
                    // update all points
                    VConsole.log("Reloading points for series : "
                            + uidlSeriesToUpdate.getStringAttribute("name"));
                    chartSeries.setDataAsPointOptions(
                            uidlSeriesDataOptions.getDataAsPointOptions(),
                            false);
                } else {
                    UIDL uidlPointsAdded = uidlSeriesToUpdate.getChildUIDL(0);
                    UIDL uidlPointsRemoved = uidlSeriesToUpdate.getChildUIDL(1);
                    updateSeriesData(chartSeries, uidlPointsAdded,
View Full Code Here


        JsArray<GwtSeriesDataOptions> seriesDataArr = JavaScriptObject
                .createArray().cast();
        // Process each series data
        for (int cnt = 0; cnt < uidl.getChildCount(); cnt++) {
            GwtSeriesDataOptions seriesData = GwtSeriesDataOptions.create();
            UIDL seriesUIDL = uidl.getChildUIDL(cnt);
            String seriesName = seriesUIDL.getStringAttribute("name");
            if (seriesName != null && namesOfSeriesToAdd != null) {
                if (!doesArrayContainSeriesName(namesOfSeriesToAdd, seriesName)) {
                    continue;
                }
            }
            // From charts series data retrieve only those series data
            // whose names are specified in the second argument
            if (seriesUIDL.hasAttribute("name")) {
                // Setting name automatically sets series id which can later be
                // used to retrieve using chart.get(id);
                seriesData.setName(seriesName);
            }
            if (seriesUIDL.hasAttribute("stack")) {
                seriesData.setStack(seriesUIDL.getStringAttribute("stack"));
            }
            // FIXME - fallback on chart options type if series doesn't have a
            // type
            String seriesType = "line";
            if (seriesUIDL.hasAttribute("type")) {
                seriesType = seriesUIDL.getStringAttribute("type");
                seriesData.setType(seriesType);
            }
            if (seriesUIDL.hasAttribute("xAxis")) {
                seriesData.setXAxis(seriesUIDL.getIntAttribute("xAxis"));
            }
            if (seriesUIDL.hasAttribute("yAxis")) {
                seriesData.setYAxis(seriesUIDL.getIntAttribute("yAxis"));
            }
            // Get data/points
            seriesData.setDataAsPointOptions(getSeriesPoints(seriesUIDL
                    .getChildUIDL(1)));
            // Get series options
            GwtSeriesGeneralOptions seriesOptions = getSeriesOptions(
                    seriesType, seriesUIDL.getChildUIDL(0));
            if (seriesOptions != null) {
                seriesData.setSeriesOptions(seriesOptions);
            }

            seriesDataArr.push(seriesData);
        }
View Full Code Here

            setRedrawChart();
            JsArray<GwtSeriesDataOptions> uidlChartDataArr = getChartData(
                    uidlChartData, seriesToUpdate);
            for (int ind = 0; ind < seriesToUpdateList.size(); ind++) {
                UIDL uidlSeriesToUpdate = seriesToUpdateList.get(ind);
                GwtSeriesDataOptions uidlSeriesDataOptions = uidlChartDataArr
                        .get(ind);
                GwtSeries chartSeries = chart.getSeries(uidlSeriesDataOptions
                        .getName());
                GwtSeriesGeneralOptions chartSeriesOptions = chartSeries
                        .getSeriesGeneralOptions();
                GwtSeriesGeneralOptions uidlSeriesOptions = uidlSeriesDataOptions
                        .getSeriesOptions();
                // Update visibility
                boolean isVisible = (uidlSeriesOptions != null ? uidlSeriesOptions
                        .isVisible() : true);
                chartSeriesOptions.setVisible(isVisible);
                if (chartSeriesOptions.isVisible() == true
                        && chartSeries.isVisible() == false) {
                    chartSeries.show();
                }
                if (chartSeriesOptions.isVisible() == false
                        && chartSeries.isVisible() == true) {
                    chartSeries.hide();
                }
                // Update points
                if (uidlSeriesToUpdate.getBooleanAttribute("isReloadPoints")) {
                    // update all points
                    VConsole.log("Reloading points for series : "
                            + uidlSeriesToUpdate.getStringAttribute("name"));
                    chartSeries.setDataAsPointOptions(
                            uidlSeriesDataOptions.getDataAsPointOptions(),
                            false);
                } else {
                    UIDL uidlPointsAdded = uidlSeriesToUpdate.getChildUIDL(0);
                    UIDL uidlPointsRemoved = uidlSeriesToUpdate.getChildUIDL(1);
                    updateSeriesData(chartSeries, uidlPointsAdded,
View Full Code Here

        JsArray<GwtSeriesDataOptions> seriesDataArr = JavaScriptObject
                .createArray().cast();
        // Process each series data
        for (int cnt = 0; cnt < uidl.getChildCount(); cnt++) {
            GwtSeriesDataOptions seriesData = GwtSeriesDataOptions.create();
            UIDL seriesUIDL = uidl.getChildUIDL(cnt);
            String seriesName = seriesUIDL.getStringAttribute("name");
            if (seriesName != null && namesOfSeriesToAdd != null) {
                if (!doesArrayContainSeriesName(namesOfSeriesToAdd, seriesName)) {
                    continue;
                }
            }
            // From charts series data retrieve only those series data
            // whose names are specified in the second argument
            if (seriesUIDL.hasAttribute("name")) {
                // Setting name automatically sets series id which can later be
                // used to retrieve using chart.get(id);
                seriesData.setName(seriesName);
            }
            if (seriesUIDL.hasAttribute("stack")) {
                seriesData.setStack(seriesUIDL.getStringAttribute("stack"));
            }
            // FIXME - fallback on chart options type if series doesn't have a
            // type
            String seriesType = "line";
            if (seriesUIDL.hasAttribute("type")) {
                seriesType = seriesUIDL.getStringAttribute("type");
                seriesData.setType(seriesType);
            }
            if (seriesUIDL.hasAttribute("xAxis")) {
                seriesData.setXAxis(seriesUIDL.getIntAttribute("xAxis"));
            }
            if (seriesUIDL.hasAttribute("yAxis")) {
                seriesData.setYAxis(seriesUIDL.getIntAttribute("yAxis"));
            }
            // Get data/points
            seriesData.setDataAsPointOptions(getSeriesPoints(seriesUIDL
                    .getChildUIDL(1)));
            // Get series options
            GwtSeriesGeneralOptions seriesOptions = getSeriesOptions(
                    seriesType, seriesUIDL.getChildUIDL(0));
            if (seriesOptions != null) {
                seriesData.setSeriesOptions(seriesOptions);
            }

            seriesDataArr.push(seriesData);
        }
View Full Code Here

            setRedrawChart();
            JsArray<GwtSeriesDataOptions> uidlChartDataArr = getChartData(
                    uidlChartData, seriesToUpdate);
            for (int ind = 0; ind < seriesToUpdateList.size(); ind++) {
                UIDL uidlSeriesToUpdate = seriesToUpdateList.get(ind);
                GwtSeriesDataOptions uidlSeriesDataOptions = uidlChartDataArr
                        .get(ind);
                GwtSeries chartSeries = chart.getSeries(uidlSeriesDataOptions
                        .getName());
                GwtSeriesGeneralOptions chartSeriesOptions = chartSeries
                        .getSeriesGeneralOptions();
                GwtSeriesGeneralOptions uidlSeriesOptions = uidlSeriesDataOptions
                        .getSeriesOptions();
                // Update visibility
                boolean isVisible = (uidlSeriesOptions != null
                        && uidlSeriesOptions.isVisible() != null ? uidlSeriesOptions
                        .isVisible() : true);
                chartSeriesOptions.setVisible(isVisible);
                if (chartSeriesOptions.isVisible() == true
                        && chartSeries.isVisible() == false) {
                    chartSeries.show();
                }
                if (chartSeriesOptions.isVisible() == false
                        && chartSeries.isVisible() == true) {
                    chartSeries.hide();
                }
                // Update points
                if (uidlSeriesToUpdate.getBooleanAttribute("isReloadPoints")) {
                    // update all points
                    VConsole.log("Reloading points for series : "
                            + uidlSeriesToUpdate.getStringAttribute("name"));
                    chartSeries.setDataAsPointOptions(
                            uidlSeriesDataOptions.getDataAsPointOptions(),
                            false);
                } else {
                    UIDL uidlPointsAdded = uidlSeriesToUpdate.getChildUIDL(0);
                    UIDL uidlPointsRemoved = uidlSeriesToUpdate.getChildUIDL(1);
                    updateSeriesData(chartSeries, uidlPointsAdded,
View Full Code Here

        JsArray<GwtSeriesDataOptions> seriesDataArr = JavaScriptObject
                .createArray().cast();
        // Process each series data
        for (int cnt = 0; cnt < uidl.getChildCount(); cnt++) {
            GwtSeriesDataOptions seriesData = GwtSeriesDataOptions.create();
            UIDL seriesUIDL = uidl.getChildUIDL(cnt);
            String seriesName = seriesUIDL.getStringAttribute("name");
            if (seriesName != null && namesOfSeriesToAdd != null) {
                if (!doesArrayContainSeriesName(namesOfSeriesToAdd, seriesName)) {
                    continue;
                }
            }
            // From charts series data retrieve only those series data
            // whose names are specified in the second argument
            if (seriesUIDL.hasAttribute("name")) {
                // Setting name automatically sets series id which can later be
                // used to retrieve using chart.get(id);
                seriesData.setName(seriesName);
            }
            if (seriesUIDL.hasAttribute("stack")) {
                seriesData.setStack(seriesUIDL.getStringAttribute("stack"));
            }
            // FIXME - fallback on chart options type if series doesn't have a
            // type
            String seriesType = "line";
            if (seriesUIDL.hasAttribute("type")) {
                seriesType = seriesUIDL.getStringAttribute("type");
                seriesData.setType(seriesType);
            }
            if (seriesUIDL.hasAttribute("xAxis")) {
                seriesData.setXAxis(seriesUIDL.getIntAttribute("xAxis"));
            }
            if (seriesUIDL.hasAttribute("yAxis")) {
                seriesData.setYAxis(seriesUIDL.getIntAttribute("yAxis"));
            }
            // Get data/points
            seriesData.setDataAsPointOptions(getSeriesPoints(seriesUIDL
                    .getChildUIDL(1)));
            // Get series options
            GwtSeriesGeneralOptions seriesOptions = getSeriesOptions(
                    seriesType, seriesUIDL.getChildUIDL(0));
            if (seriesOptions != null) {
                seriesData.setSeriesOptions(seriesOptions);
            }

            seriesDataArr.push(seriesData);
        }
View Full Code Here

            setRedrawChart();
            JsArray<GwtSeriesDataOptions> uidlChartDataArr = getChartData(
                    uidlChartData, seriesToUpdate);
            for (int ind = 0; ind < seriesToUpdateList.size(); ind++) {
                UIDL uidlSeriesToUpdate = seriesToUpdateList.get(ind);
                GwtSeriesDataOptions uidlSeriesDataOptions = uidlChartDataArr
                        .get(ind);
                GwtSeries chartSeries = chart.getSeries(uidlSeriesDataOptions
                        .getName());
                GwtSeriesGeneralOptions chartSeriesOptions = chartSeries
                        .getSeriesGeneralOptions();
                GwtSeriesGeneralOptions uidlSeriesOptions = uidlSeriesDataOptions
                        .getSeriesOptions();
                // Update visibility
                boolean isVisible = (uidlSeriesOptions != null ? uidlSeriesOptions
                        .isVisible() : true);
                chartSeriesOptions.setVisible(isVisible);               
                if (chartSeriesOptions.isVisible() == true
                        && chartSeries.isVisible() == false) {
                    chartSeries.show();
                }
                else if (chartSeriesOptions.isVisible() == false
                        && chartSeries.isVisible() == true) {
                    chartSeries.hide();
                }               
               
                // Update points
                if (uidlSeriesToUpdate.getBooleanAttribute("isReloadPoints")) {
                    // update all points
                    VConsole.log("Reloading points for series : "
                            + uidlSeriesToUpdate.getStringAttribute("name"));
                    chartSeries.setDataAsPointOptions(
                            uidlSeriesDataOptions.getDataAsPointOptions(),
                            false);
                } else {
                    UIDL uidlPointsAdded = uidlSeriesToUpdate.getChildUIDL(0);
                    UIDL uidlPointsRemoved = uidlSeriesToUpdate.getChildUIDL(1);
                    updateSeriesData(chartSeries, uidlPointsAdded,
View Full Code Here

        JsArray<GwtSeriesDataOptions> seriesDataArr = JavaScriptObject
                .createArray().cast();
        // Process each series data
        for (int cnt = 0; cnt < uidl.getChildCount(); cnt++) {
            GwtSeriesDataOptions seriesData = GwtSeriesDataOptions.create();
            UIDL seriesUIDL = uidl.getChildUIDL(cnt);
            String seriesName = seriesUIDL.getStringAttribute("name");
            if (seriesName != null && namesOfSeries != null) {
                if (!doesArrayContainSeriesName(namesOfSeries, seriesName)) {
                    continue;
                }
            }
            // From charts series data retrieve only those series data
            // whose names are specified in the second argument
            if (seriesUIDL.hasAttribute("name")) {
                // Setting name automatically sets series id which can later be
                // used to retrieve using chart.get(id);
                seriesData.setName(seriesName);
            }
            if (seriesUIDL.hasAttribute("stack")) {
                seriesData.setStack(seriesUIDL.getStringAttribute("stack"));
            }
            // FIXME - fallback on chart options type if series doesn't have a
            // type
            String seriesType = "line";
            if (seriesUIDL.hasAttribute("type")) {
                seriesType = seriesUIDL.getStringAttribute("type");
                seriesData.setType(seriesType);
            }
            if (seriesUIDL.hasAttribute("xAxis")) {
                seriesData.setXAxis(seriesUIDL.getIntAttribute("xAxis"));
            }
            if (seriesUIDL.hasAttribute("yAxis")) {
                seriesData.setYAxis(seriesUIDL.getIntAttribute("yAxis"));
            }
            // Get data/points
            seriesData.setDataAsPointOptions(getSeriesPoints(seriesUIDL
                    .getChildUIDL(1)));
            // Get series options
            GwtSeriesGeneralOptions seriesOptions = getSeriesOptions(
                    seriesType, seriesUIDL.getChildUIDL(0));
            if (seriesOptions != null) {
                seriesData.setSeriesOptions(seriesOptions);
            }

            seriesDataArr.push(seriesData);
        }
View Full Code Here

        }
        if (seriesToUpdate.length() > 0) {
            JsArray<GwtSeriesDataOptions> uidlChartDataArr = getChartData(
                    uidlChartData, seriesToUpdate);
            for (int ind = 0; ind < uidlChartDataArr.length(); ind++) {
                GwtSeriesDataOptions uidlSeriesDataOptions = uidlChartDataArr
                        .get(ind);
                GwtSeries chartSeries = chart.getSeries(uidlSeriesDataOptions
                        .getName());
                GwtSeriesGeneralOptions chartSeriesOptions = chartSeries
                        .getSeriesGeneralOptions();
                GwtSeriesGeneralOptions uidlSeriesOptions = uidlSeriesDataOptions
                        .getSeriesOptions();
                // Update visibility
                boolean isVisible = (uidlSeriesOptions.isVisible() != null ? uidlSeriesOptions
                        .isVisible() : true);
                chartSeriesOptions.setVisible(isVisible);
View Full Code Here

        JsArray<GwtSeriesDataOptions> seriesDataArr = JavaScriptObject
                .createArray().cast();
        // Process each series data
        for (int cnt = 0; cnt < uidl.getChildCount(); cnt++) {
            GwtSeriesDataOptions seriesData = GwtSeriesDataOptions.create();
            UIDL seriesUIDL = uidl.getChildUIDL(cnt);
            String seriesName = seriesUIDL.getStringAttribute("name");
            if (seriesName != null && namesOfSeriesToAdd != null) {
                if (!doesArrayContainSeriesName(namesOfSeriesToAdd, seriesName)) {
                    continue;
                }
            }
            // From charts series data retrieve only those series data
            // whose names are specified in the second argument
            if (seriesUIDL.hasAttribute("name")) {
                // Setting name automatically sets series id which can later be
                // used to retrieve using chart.get(id);
                seriesData.setName(seriesName);
            }
            if (seriesUIDL.hasAttribute("stack")) {
                seriesData.setStack(seriesUIDL.getStringAttribute("stack"));
            }
            // FIXME - fallback on chart options type if series doesn't have a
            // type
            String seriesType = "line";
            if (seriesUIDL.hasAttribute("type")) {
                seriesType = seriesUIDL.getStringAttribute("type");
                seriesData.setType(seriesType);
            }
            if (seriesUIDL.hasAttribute("xAxis")) {
                seriesData.setXAxis(seriesUIDL.getIntAttribute("xAxis"));
            }
            if (seriesUIDL.hasAttribute("yAxis")) {
                seriesData.setYAxis(seriesUIDL.getIntAttribute("yAxis"));
            }
            // Get data/points
            seriesData.setDataAsPointOptions(getSeriesPoints(seriesUIDL
                    .getChildUIDL(1)));
            // Get series options
            GwtSeriesGeneralOptions seriesOptions = getSeriesOptions(
                    seriesType, seriesUIDL.getChildUIDL(0));
            if (seriesOptions != null) {
                seriesData.setSeriesOptions(seriesOptions);
            }

            seriesDataArr.push(seriesData);
        }
View Full Code Here

TOP

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

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.