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

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


            // Add points
            JsArray<GwtPointOptions> pointsTobeAdded = getSeriesPoints(uidlPointsAdded);
            VConsole.log("# of points to be added : "
                    + pointsTobeAdded.length());
            for (int cnt = 0; cnt < pointsTobeAdded.length(); cnt++) {
                GwtPointOptions pointOptions = pointsTobeAdded.get(cnt);
                chartSeries.addPoint(pointOptions, false,
                        pointOptions.isShift());
            }
        }

        if (uidlPointsRemoved != null && uidlPointsRemoved.getChildCount() > 0) {
            // Remove points
            JsArray<GwtPointOptions> pointsTobeRemoved = getSeriesPoints(uidlPointsRemoved);
            VConsole.log("# of points to be removed : "
                    + pointsTobeRemoved.length());
            JsArray<GwtPoint> chartSeriesData = chartSeries.getData();
            for (int cnt = 0; cnt < pointsTobeRemoved.length(); cnt++) {
                GwtPointOptions pointToRemove = pointsTobeRemoved.get(cnt);
                for (int chartPointCnt = 0; chartPointCnt < chartSeriesData
                        .length(); chartPointCnt++) {
                    GwtPoint chartSeriesPoint = chartSeriesData
                            .get(chartPointCnt);
                    // Using Double.compareTo(another Double) does not result in
                    // appr. code which can be executed in JS correctly.
                    // e.g. x.compareTo(y) results in compare(x.value, y.value)
                    // where x.value is undefined in JS,
                    // Don't know the reason yet but will figure out. So do a
                    // direct comparison
                    if (chartSeriesPoint.getX() == pointToRemove.getX()
                            && chartSeriesPoint.getY() == pointToRemove.getY()) {
                        VConsole.log("Removing point ("
                                + chartSeriesPoint.getX() + ", "
                                + chartSeriesPoint.getY() + ")");
                        chartSeriesPoint.remove();
                        break;
View Full Code Here


        JsArray<GwtPointOptions> pointsArr = JavaScriptObject.createArray()
                .cast();
        for (int cnt = 0; cnt < pointsUIDL.getChildCount(); cnt++) {
            UIDL pointUIDL = pointsUIDL.getChildUIDL(cnt);
            GwtPointOptions pointOptions = GwtPointOptions.create();
            // If a point doesn't have any attributes then
            // consider it as a null since a user might want to represent
            // no activity graph
            if (pointUIDL.getAttributeNames().size() == 0) {
                pointOptions.setNullY();
            } else {
                if (pointUIDL.hasAttribute("id")) {
                    pointOptions.setId(pointUIDL.getStringAttribute("id"));
                }
                if (pointUIDL.hasAttribute("name")) {
                    pointOptions.setName(pointUIDL.getStringAttribute("name"));
                }
                if (pointUIDL.hasAttribute("color")) {
                    pointOptions
                            .setColor(pointUIDL.getStringAttribute("color"));
                }
                if (pointUIDL.hasAttribute("sliced")) {
                    pointOptions.setSliced(pointUIDL
                            .getBooleanAttribute("sliced"));
                }
                if (pointUIDL.hasAttribute("selected")) {
                    pointOptions.setSelected(pointUIDL
                            .getBooleanAttribute("selected"));
                }
                if (pointUIDL.hasAttribute("x")) {
                    pointOptions.setX(pointUIDL.getIntAttribute("x"));
                } else {
                    pointOptions.setNullX();
                }
                if (pointUIDL.hasAttribute("y")) {
                    pointOptions.setY(pointUIDL.getIntAttribute("y"));
                } else {
                    pointOptions.setNullY();
                }
                if (pointUIDL.hasAttribute("isShift")) {
                    pointOptions.setShift(pointUIDL
                            .getBooleanAttribute("isShift"));
                }
                GwtMarker markerOptions = getMarkerOptions(pointUIDL
                        .getChildUIDL(0));
                if (markerOptions != null) {
                    pointOptions.setMarker(markerOptions);
                }
            }
            pointsArr.push(pointOptions);
        }
View Full Code Here

            // Add points
            JsArray<GwtPointOptions> pointsTobeAdded = getSeriesPoints(uidlPointsAdded);
            VConsole.log("# of points to be added : "
                    + pointsTobeAdded.length());
            for (int cnt = 0; cnt < pointsTobeAdded.length(); cnt++) {
                GwtPointOptions pointOptions = pointsTobeAdded.get(cnt);
                chartSeries.addPoint(pointOptions, false,
                        pointOptions.isShift());
            }
        }

        if (uidlPointsRemoved != null && uidlPointsRemoved.getChildCount() > 0) {
            // Remove points
            JsArray<GwtPointOptions> pointsTobeRemoved = getSeriesPoints(uidlPointsRemoved);
            VConsole.log("# of points to be removed : "
                    + pointsTobeRemoved.length());
            JsArray<GwtPoint> chartSeriesData = chartSeries.getData();
            for (int cnt = 0; cnt < pointsTobeRemoved.length(); cnt++) {
                GwtPointOptions pointToRemove = pointsTobeRemoved.get(cnt);
                for (int chartPointCnt = 0; chartPointCnt < chartSeriesData
                        .length(); chartPointCnt++) {
                    GwtPoint chartSeriesPoint = chartSeriesData
                            .get(chartPointCnt);
                    // Using Double.compareTo(another Double) does not result in
                    // appr. code which can be executed in JS correctly.
                    // e.g. x.compareTo(y) results in compare(x.value, y.value)
                    // where x.value is undefined in JS,
                    // Don't know the reason yet but will figure out. So do a
                    // direct comparison
                    if (chartSeriesPoint.getX() == pointToRemove.getX()
                            && chartSeriesPoint.getY() == pointToRemove.getY()) {
                        VConsole.log("Removing point ("
                                + chartSeriesPoint.getX() + ", "
                                + chartSeriesPoint.getY() + ")");
                        chartSeriesPoint.remove();
                        break;
View Full Code Here

        JsArray<GwtPointOptions> pointsArr = JavaScriptObject.createArray()
                .cast();
        for (int cnt = 0; cnt < pointsUIDL.getChildCount(); cnt++) {
            UIDL pointUIDL = pointsUIDL.getChildUIDL(cnt);
            GwtPointOptions pointOptions = GwtPointOptions.create();
            // If a point doesn't have any attributes then
            // consider it as a null since a user might want to represent
            // no activity graph
            if (pointUIDL.getAttributeNames().size() == 0) {
                pointOptions.setNullY();
            } else {
                if (pointUIDL.hasAttribute("id")) {
                    pointOptions.setId(pointUIDL.getStringAttribute("id"));
                }
                if (pointUIDL.hasAttribute("name")) {
                    pointOptions.setName(pointUIDL.getStringAttribute("name"));
                }
                if (pointUIDL.hasAttribute("color")) {
                    pointOptions
                            .setColor(pointUIDL.getStringAttribute("color"));
                }
                if (pointUIDL.hasAttribute("sliced")) {
                    pointOptions.setSliced(pointUIDL
                            .getBooleanAttribute("sliced"));
                }
                if (pointUIDL.hasAttribute("selected")) {
                    pointOptions.setSelected(pointUIDL
                            .getBooleanAttribute("selected"));
                }
                if (pointUIDL.hasAttribute("x")) {
                    pointOptions.setX(pointUIDL.getIntAttribute("x"));
                } else {
                    pointOptions.setNullX();
                }
                if (pointUIDL.hasAttribute("y")) {
                    pointOptions.setY(pointUIDL.getIntAttribute("y"));
                } else {
                    pointOptions.setNullY();
                }
                if (pointUIDL.hasAttribute("isShift")) {
                    pointOptions.setShift(pointUIDL
                            .getBooleanAttribute("isShift"));
                }
                GwtMarker markerOptions = getMarkerOptions(pointUIDL
                        .getChildUIDL(0));
                if (markerOptions != null) {
                    pointOptions.setMarker(markerOptions);
                }
            }
            pointsArr.push(pointOptions);
        }
View Full Code Here

            // Add points
            JsArray<GwtPointOptions> pointsTobeAdded = getSeriesPoints(uidlPointsAdded);
            VConsole.log("# of points to be added : "
                    + pointsTobeAdded.length());
            for (int cnt = 0; cnt < pointsTobeAdded.length(); cnt++) {
                GwtPointOptions pointOptions = pointsTobeAdded.get(cnt);
                chartSeries.addPoint(pointOptions, false,
                        pointOptions.isShift());
            }
        }

        if (uidlPointsRemoved != null && uidlPointsRemoved.getChildCount() > 0) {
            // Remove points
            JsArray<GwtPointOptions> pointsTobeRemoved = getSeriesPoints(uidlPointsRemoved);
            VConsole.log("# of points to be removed : "
                    + pointsTobeRemoved.length());
            JsArray<GwtPoint> chartSeriesData = chartSeries.getData();
            for (int cnt = 0; cnt < pointsTobeRemoved.length(); cnt++) {
                GwtPointOptions pointToRemove = pointsTobeRemoved.get(cnt);
                for (int chartPointCnt = 0; chartPointCnt < chartSeriesData
                        .length(); chartPointCnt++) {
                    GwtPoint chartSeriesPoint = chartSeriesData
                            .get(chartPointCnt);
                    // Using Double.compareTo(another Double) does not result in
                    // appr. code which can be executed in JS correctly.
                    // e.g. x.compareTo(y) results in compare(x.value, y.value)
                    // where x.value is undefined in JS,
                    // Don't know the reason yet but will figure out. So do a
                    // direct comparison
                    if (chartSeriesPoint.getX() == pointToRemove.getX()
                            && chartSeriesPoint.getY() == pointToRemove.getY()) {
                        VConsole.log("Removing point ("
                                + chartSeriesPoint.getX() + ", "
                                + chartSeriesPoint.getY() + ")");
                        chartSeriesPoint.remove();
                        break;
View Full Code Here

        JsArray<GwtPointOptions> pointsArr = JavaScriptObject.createArray()
                .cast();
        for (int cnt = 0; cnt < pointsUIDL.getChildCount(); cnt++) {
            UIDL pointUIDL = pointsUIDL.getChildUIDL(cnt);
            GwtPointOptions pointOptions = GwtPointOptions.create();
            // If a point doesn't have any attributes then
            // consider it as a null since a user might want to represent
            // no activity graph
            if (pointUIDL.getAttributeNames().size() == 0) {
                pointOptions.setNullY();
            } else {
                if (pointUIDL.hasAttribute("id")) {
                    pointOptions.setId(pointUIDL.getStringAttribute("id"));
                }
                if (pointUIDL.hasAttribute("name")) {
                    pointOptions.setName(pointUIDL.getStringAttribute("name"));
                }
                if (pointUIDL.hasAttribute("color")) {
                    pointOptions
                            .setColor(pointUIDL.getStringAttribute("color"));
                }
                if (pointUIDL.hasAttribute("sliced")) {
                    pointOptions.setSliced(pointUIDL
                            .getBooleanAttribute("sliced"));
                }
                if (pointUIDL.hasAttribute("selected")) {
                    pointOptions.setSelected(pointUIDL
                            .getBooleanAttribute("selected"));
                }
                if (pointUIDL.hasAttribute("x")) {
                    pointOptions.setX(pointUIDL.getIntAttribute("x"));
                } else {
                    pointOptions.setNullX();
                }
                if (pointUIDL.hasAttribute("y")) {
                    pointOptions.setY(pointUIDL.getIntAttribute("y"));
                } else {
                    pointOptions.setNullY();
                }
                if (pointUIDL.hasAttribute("isShift")) {
                    pointOptions.setShift(pointUIDL
                            .getBooleanAttribute("isShift"));
                }
                GwtMarker markerOptions = getMarkerOptions(pointUIDL
                        .getChildUIDL(0));
                if (markerOptions != null) {
                    pointOptions.setMarker(markerOptions);
                }
            }
            pointsArr.push(pointOptions);
        }
View Full Code Here

            // Add points
            JsArray<GwtPointOptions> pointsTobeAdded = getSeriesPoints(uidlPointsAdded);
            VConsole.log("# of points to be added : "
                    + pointsTobeAdded.length());
            for (int cnt = 0; cnt < pointsTobeAdded.length(); cnt++) {
                GwtPointOptions pointOptions = pointsTobeAdded.get(cnt);
                chartSeries.addPoint(pointOptions, false,
                        pointOptions.isShift());
            }
        }

        if (uidlPointsRemoved != null && uidlPointsRemoved.getChildCount() > 0) {
            // Remove points
            JsArray<GwtPointOptions> pointsTobeRemoved = getSeriesPoints(uidlPointsRemoved);
            VConsole.log("# of points to be removed : "
                    + pointsTobeRemoved.length());
            JsArray<GwtPoint> chartSeriesData = chartSeries.getData();
            for (int cnt = 0; cnt < pointsTobeRemoved.length(); cnt++) {
                GwtPointOptions pointToRemove = pointsTobeRemoved.get(cnt);
                for (int chartPointCnt = 0; chartPointCnt < chartSeriesData
                        .length(); chartPointCnt++) {
                    GwtPoint chartSeriesPoint = chartSeriesData
                            .get(chartPointCnt);
                    // Using Double.compareTo(another Double) does not result in
                    // appr. code which can be executed in JS correctly.
                    // e.g. x.compareTo(y) results in compare(x.value, y.value)
                    // where x.value is undefined in JS,
                    // Don't know the reason yet but will figure out. So do a
                    // direct comparison
                    if (chartSeriesPoint.getX() == pointToRemove.getX()
                            && chartSeriesPoint.getY() == pointToRemove.getY()) {
                        VConsole.log("Removing point ("
                                + chartSeriesPoint.getX() + ", "
                                + chartSeriesPoint.getY() + ")");
                        chartSeriesPoint.remove();
                        break;
View Full Code Here

        JsArray<GwtPointOptions> pointsArr = JavaScriptObject.createArray()
                .cast();
        for (int cnt = 0; cnt < pointsUIDL.getChildCount(); cnt++) {
            UIDL pointUIDL = pointsUIDL.getChildUIDL(cnt);
            GwtPointOptions pointOptions = GwtPointOptions.create();
            // If a point doesn't have any attributes then
            // consider it as a null since a user might want to represent
            // no activity graph
            if (pointUIDL.getAttributeNames().size() == 0) {
                pointOptions.setNullY();
            } else {
                if (pointUIDL.hasAttribute("id")) {
                    pointOptions.setId(pointUIDL.getStringAttribute("id"));
                }
                if (pointUIDL.hasAttribute("name")) {
                    pointOptions.setName(pointUIDL.getStringAttribute("name"));
                }
                if (pointUIDL.hasAttribute("color")) {
                    pointOptions
                            .setColor(pointUIDL.getStringAttribute("color"));
                }
                if (pointUIDL.hasAttribute("sliced")) {
                    pointOptions.setSliced(pointUIDL
                            .getBooleanAttribute("sliced"));
                }
                if (pointUIDL.hasAttribute("selected")) {
                    pointOptions.setSelected(pointUIDL
                            .getBooleanAttribute("selected"));
                }
                if (pointUIDL.hasAttribute("x")) {
                    pointOptions.setX(pointUIDL.getIntAttribute("x"));
                } else {
                    pointOptions.setNullX();
                }
                if (pointUIDL.hasAttribute("y")) {
                    pointOptions.setY(pointUIDL.getIntAttribute("y"));
                } else {
                    pointOptions.setNullY();
                }
                if (pointUIDL.hasAttribute("isShift")) {
                    pointOptions.setShift(pointUIDL
                            .getBooleanAttribute("isShift"));
                }
                GwtMarker markerOptions = getMarkerOptions(pointUIDL
                        .getChildUIDL(0));
                if (markerOptions != null) {
                    pointOptions.setMarker(markerOptions);
                }
            }
            pointsArr.push(pointOptions);
        }
View Full Code Here

        JsArray<GwtPointOptions> pointsArr = JavaScriptObject.createArray()
                .cast();
        for (int cnt = 0; cnt < pointsUIDL.getChildCount(); cnt++) {
            UIDL pointUIDL = pointsUIDL.getChildUIDL(cnt);
            GwtPointOptions pointOptions = GwtPointOptions.create();
            // If a point doesn't have any attributes then
            // consider it as a null since a user might want to represent
            // no activity graph
            if (pointUIDL.getAttributeNames().size() == 0) {
                pointOptions.setNullY();
            } else {
                if (pointUIDL.hasAttribute("id")) {
                    pointOptions.setId(pointUIDL.getStringAttribute("id"));
                }
                if (pointUIDL.hasAttribute("name")) {
                    pointOptions.setName(pointUIDL.getStringAttribute("name"));
                }
                if (pointUIDL.hasAttribute("color")) {
                    pointOptions
                            .setColor(pointUIDL.getStringAttribute("color"));
                }
                if (pointUIDL.hasAttribute("sliced")) {
                    pointOptions.setSliced(pointUIDL
                            .getBooleanAttribute("sliced"));
                }
                if (pointUIDL.hasAttribute("selected")) {
                    pointOptions.setSelected(pointUIDL
                            .getBooleanAttribute("selected"));
                }
                if (pointUIDL.hasAttribute("x")) {
                    pointOptions.setX(pointUIDL.getIntAttribute("x"));
                } else {
                    pointOptions.setNullX();
                }
                if (pointUIDL.hasAttribute("y")) {
                    pointOptions.setY(pointUIDL.getIntAttribute("y"));
                } else {
                    pointOptions.setNullY();
                }

                GwtMarker markerOptions = getMarkerOptions(pointUIDL
                        .getChildUIDL(0));
                if (markerOptions != null) {
                    pointOptions.setMarker(markerOptions);
                }
            }
            pointsArr.push(pointOptions);
        }
View Full Code Here

        JsArray<GwtPointOptions> pointsArr = JavaScriptObject.createArray()
                .cast();
        for (int cnt = 0; cnt < pointsUIDL.getChildCount(); cnt++) {
            UIDL pointUIDL = pointsUIDL.getChildUIDL(cnt);
            GwtPointOptions pointOptions = GwtPointOptions.create();
            // If a point doesn't have any attributes then
            // consider it as a null since a user might want to represent
            // no activity graph
            if (pointUIDL.getAttributeNames().size() == 0) {
                pointOptions.setNullY();
            } else {
                if (pointUIDL.hasAttribute("id")) {
                    pointOptions.setId(pointUIDL.getStringAttribute("id"));
                }
                if (pointUIDL.hasAttribute("name")) {
                    pointOptions.setName(pointUIDL.getStringAttribute("name"));
                }
                if (pointUIDL.hasAttribute("color")) {
                    pointOptions
                            .setColor(pointUIDL.getStringAttribute("color"));
                }
                if (pointUIDL.hasAttribute("sliced")) {
                    pointOptions.setSliced(pointUIDL
                            .getBooleanAttribute("sliced"));
                }
                if (pointUIDL.hasAttribute("selected")) {
                    pointOptions.setSelected(pointUIDL
                            .getBooleanAttribute("selected"));
                }
                if (pointUIDL.hasAttribute("x")) {
                    pointOptions.setX(pointUIDL.getIntAttribute("x"));
                } else {
                    pointOptions.setNullX();
                }
                if (pointUIDL.hasAttribute("y")) {
                    pointOptions.setY(pointUIDL.getIntAttribute("y"));
                } else {
                    pointOptions.setNullY();
                }

                GwtMarker markerOptions = getMarkerOptions(pointUIDL
                        .getChildUIDL(0));
                if (markerOptions != null) {
                    pointOptions.setMarker(markerOptions);
                }
            }
            pointsArr.push(pointOptions);
        }
View Full Code Here

TOP

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

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.