Package org.thechiselgroup.choosel.visualization_component.chart.client.functions

Examples of org.thechiselgroup.choosel.visualization_component.chart.client.functions.ViewItemColorSlotAccessor


        mainWedge = getChart().add(PV.Wedge).data(viewItemsJsArray)
                .left(wedgeLeft).bottom(wedgeBottom)
                .innerRadius(partialWedgeRadius).outerRadius(outRadiusFunction)
                .angle(wedgeAngle)
                .fillStyle(new ViewItemColorSlotAccessor(COLOR))
                .strokeStyle(new ViewItemColorSlotAccessor(BORDER_COLOR));

        mainWedge.anchor(wedgeLabelAnchor).add(PV.Label)
                .textAngle(WEDGE_TEXT_ANGLE).text(regularMarkLabelText)
                .textStyle(Colors.WHITE);

        partialWedge = mainWedge
                .add(PV.Wedge)
                .visible(
                        new ViewItemPredicateJsBooleanFunction(
                                new GreaterThanSlotValuePredicate(
                                        PARTIAL_PERCENTAGE, 0)))
                .innerRadius(0)
                .outerRadius(partialWedgeRadius)
                .fillStyle(new ViewItemColorSlotAccessor(PARTIAL_COLOR))
                .strokeStyle(
                        new ViewItemColorSlotAccessor(PARTIAL_BORDER_COLOR));

        partialWedge.anchor(wedgeLabelAnchor).add(PV.Label)
                .textAngle(WEDGE_TEXT_ANGLE).text(highlightedMarkLabelText);

    }
View Full Code Here


         * color differences if the partial bar is semi-transparent.
         */
        regularBar = getChart().add(PV.Bar).data(viewItemsJsArray)
                .left(BAR_STROKE_WIDTH).width(regularBarLength)
                .bottom(barStart).height(barWidth)
                .fillStyle(new ViewItemColorSlotAccessor(BAR_COLOR))
                .strokeStyle(new ViewItemColorSlotAccessor(BAR_BORDER_COLOR))
                .lineWidth(BAR_STROKE_WIDTH);

        if (valueLabelVisibility) {
            regularBar.anchor(PVAlignment.RIGHT).add(PV.Label)
                    .textBaseline(PVAlignment.MIDDLE).text(fullMarkLabelText)
                    .textStyle(barValueLabelTextStyle)
                    .textAlign(valueLabelAlignment);
        }

        // TODO negative bars (in opposite direction)
        /*
         * Partial bars have a white bar below them to prevent the regular bar
         * from affecting a semi-transparent partial bar.
         */
        getChart().add(PV.Bar).data(viewItemsJsArray).left(BAR_STROKE_WIDTH)
                .width(partialBarLength).bottom(partialBarStart)
                .height(partialBarWidth).fillStyle(Colors.WHITE)
                .strokeStyle(Colors.WHITE).lineWidth(BAR_STROKE_WIDTH)
                .visible(showPartialBars);
        partialBar = getChart()
                .add(PV.Bar)
                .data(viewItemsJsArray)
                .left(BAR_STROKE_WIDTH)
                .width(partialBarLength)
                .bottom(partialBarStart)
                .height(partialBarWidth)
                .fillStyle(new ViewItemColorSlotAccessor(PARTIAL_BAR_COLOR))
                .strokeStyle(
                        new ViewItemColorSlotAccessor(PARTIAL_BAR_BORDER_COLOR))
                .lineWidth(BAR_STROKE_WIDTH).visible(showPartialBars);

        if (valueLabelVisibility) {
            partialBar.anchor(PVAlignment.RIGHT).add(PV.Label)
                    .textBaseline(BAR_TEXT_BASELINE).text(partialLabelText)
View Full Code Here

         * color differences if the partial bar is semi-transparent.
         */
        regularBar = getChart().add(PV.Bar).data(viewItemsJsArray)
                .bottom(BAR_STROKE_WIDTH).height(regularBarLength)
                .left(barStart).width(barWidth)
                .fillStyle(new ViewItemColorSlotAccessor(BAR_COLOR))
                .strokeStyle(new ViewItemColorSlotAccessor(BAR_BORDER_COLOR))
                .lineWidth(BAR_STROKE_WIDTH);

        if (valueLabelVisibility) {
            regularBar.anchor(PVAlignment.TOP).add(PV.Label)
                    .textAngle(-Math.PI / 2).textBaseline(PVAlignment.MIDDLE)
                    .textAlign(valueLabelAlignment)
                    .textStyle(barValueLabelTextStyle).text(fullMarkLabelText);
        }

        /*
         * Partial bars have a white bar below them to prevent the regular bar
         * from affecting a semi-transparent partial bar.
         */
        getChart().add(PV.Bar).data(viewItemsJsArray).bottom(BAR_STROKE_WIDTH)
                .height(partialBarLength).left(partialBarStart)
                .width(partialBarWidth).fillStyle(Colors.WHITE)
                .strokeStyle(Colors.WHITE).lineWidth(BAR_STROKE_WIDTH)
                .visible(showPartialBars);
        partialBar = getChart()
                .add(PV.Bar)
                .data(viewItemsJsArray)
                .bottom(BAR_STROKE_WIDTH)
                .height(partialBarLength)
                .left(partialBarStart)
                .width(partialBarWidth)
                .fillStyle(new ViewItemColorSlotAccessor(PARTIAL_BAR_COLOR))
                .strokeStyle(
                        new ViewItemColorSlotAccessor(PARTIAL_BAR_BORDER_COLOR))
                .lineWidth(BAR_STROKE_WIDTH).visible(showPartialBars);

        if (valueLabelVisibility) {
            partialBar.anchor(PVAlignment.TOP).add(PV.Label)
                    .textBaseline(PVAlignment.MIDDLE)
View Full Code Here

        dots = getChart().add(PV.Dot).data(viewItemsJsArray)
                .shape(new ViewItemStringSlotAccessor(SHAPE))
                .bottom(scaleY.fd(new ViewItemDoubleSlotAccessor(Y_POSITION)))
                .left(scaleX.fd(new ViewItemDoubleSlotAccessor(X_POSITION)))
                .size(new ViewItemDoubleSlotAccessor(SIZE))
                .fillStyle(new ViewItemColorSlotAccessor(COLOR))
                .strokeStyle(new ViewItemColorSlotAccessor(BORDER_COLOR))
                .lineWidth(BORDER_WIDTH);
    }
View Full Code Here

TOP

Related Classes of org.thechiselgroup.choosel.visualization_component.chart.client.functions.ViewItemColorSlotAccessor

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.