How to use the raphael.color function in raphael

To help you get started, we’ve selected a few raphael examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nhn / tui.chart / src / js / plugins / raphaelBoxplotChart.js View on Github external
selectSeries(indexes) {
        const bar = this.groupBoxes[indexes.groupIndex][indexes.index];
        const objColor = raphael.color(bar.color);
        const selectionColorTheme = this.theme.selectionColor;
        const makeColor = raphaelRenderUtil.makeChangedLuminanceColor;
        const color = selectionColorTheme || makeColor(objColor.hex, DEFAULT_LUMINANC);
        let {borderColor} = this.theme;

        if (borderColor) {
            const objBorderColor = raphael.color(borderColor);
            borderColor = raphaelRenderUtil.makeChangedLuminanceColor(objBorderColor.hex, DEFAULT_LUMINANC);
        }

        this._changeBoxColor(indexes, color, borderColor);
    }
github nhn / tui.chart / src / js / plugins / raphaelPieChart.js View on Github external
selectSeries(indexes) {
        const sectorInfo = this.sectorInfos[indexes.index];

        if (!sectorInfo) {
            return;
        }

        const objColor = raphael.color(sectorInfo.color);
        const luminanceColor = raphaelRenderUtil.makeChangedLuminanceColor(objColor.hex, DEFAULT_LUMINANT_VALUE);
        const color = this.selectionColor || luminanceColor;

        sectorInfo.sector.attr({
            fill: color
        });
    }
github nhn / tui.chart / src / js / plugins / raphaelBoxplotChart.js View on Github external
selectSeries(indexes) {
        const bar = this.groupBoxes[indexes.groupIndex][indexes.index];
        const objColor = raphael.color(bar.color);
        const selectionColorTheme = this.theme.selectionColor;
        const makeColor = raphaelRenderUtil.makeChangedLuminanceColor;
        const color = selectionColorTheme || makeColor(objColor.hex, DEFAULT_LUMINANC);
        let {borderColor} = this.theme;

        if (borderColor) {
            const objBorderColor = raphael.color(borderColor);
            borderColor = raphaelRenderUtil.makeChangedLuminanceColor(objBorderColor.hex, DEFAULT_LUMINANC);
        }

        this._changeBoxColor(indexes, color, borderColor);
    }
github nhn / tui.chart / src / js / plugins / raphaelBarChart.js View on Github external
selectSeries(indexes) {
        const bar = this.groupBars[indexes.groupIndex][indexes.index];
        const objColor = raphael.color(bar.color);
        const selectionColorTheme = this.theme.selectionColor;
        const color = (
            selectionColorTheme || raphaelRenderUtil.makeChangedLuminanceColor(objColor.hex, DEFAULT_LUMINANC)
        );
        let {borderColor} = this.theme;

        if (borderColor) {
            const objBorderColor = raphael.color(borderColor);
            borderColor = raphaelRenderUtil.makeChangedLuminanceColor(objBorderColor.hex, DEFAULT_LUMINANC);
        }

        this._changeBarColor(indexes, color, borderColor);
    }
github nhn / tui.chart / src / js / plugins / raphaelBarChart.js View on Github external
selectSeries(indexes) {
        const bar = this.groupBars[indexes.groupIndex][indexes.index];
        const objColor = raphael.color(bar.color);
        const selectionColorTheme = this.theme.selectionColor;
        const color = (
            selectionColorTheme || raphaelRenderUtil.makeChangedLuminanceColor(objColor.hex, DEFAULT_LUMINANC)
        );
        let {borderColor} = this.theme;

        if (borderColor) {
            const objBorderColor = raphael.color(borderColor);
            borderColor = raphaelRenderUtil.makeChangedLuminanceColor(objBorderColor.hex, DEFAULT_LUMINANC);
        }

        this._changeBarColor(indexes, color, borderColor);
    }
github nhn / tui.chart / src / js / plugins / raphaelCoordinateTypeChart.js View on Github external
selectSeries(indexes) {
        const {groupIndex, index} = indexes;
        const circleInfo = this.groupCircleInfos[groupIndex][index];
        const objColor = raphael.color(circleInfo.color);
        const themeColor = this.theme.selectionColor;
        const color = themeColor || raphaelRenderUtil.makeChangedLuminanceColor(objColor.hex, DEFAULT_LUMINANC);

        circleInfo.circle.attr({
            fill: color
        });
    }