We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Series Color Issues

I am trying to change the color of the series for the javascript chart control, but no matter what I put in, it always stays the same color.  Below is my code for creating the chart:

$('#' + divG).ejChart({
            palette: ["#69D2E7", "#E27F2D", "#6A4B82"],
            series: SeriesBuilder(ys.length, arrY, graph, bvalues, valX, datasrc),
            text: "",
            needResize: true,
            canResize: true,
            legend: { visible: blegend },
            zooming: { enabled: true },
            //showTooltip: $('#chkValues').prop('checked'),
            size: { width: (w - 20), height: (w * .65) }
        });



function SeriesBuilder(n, arrY, graph, bvalues, valX, datasrc) {
        var arr = new Array();
        var ys = arrY;
        for (var i = 0; i < n; i++) {
            arr[i] = {
                name: ys[i],
                type: graph,
                marker: { visible: bvalues },
                style: { opacity: 0.8 },
                dataSource: {
                    data: repdata[datasrc],
                    xName: valX,
                    yNames: [ys[i]]
                }
            }
        }

        return arr;
    }


1 Reply

AT Anandaraj T Syncfusion Team July 30, 2014 04:29 AM UTC

Hi Anthony,

Thanks for using Syncfusion products.

We have created a simple sample using the code snippet provided by you but the issue is not reproduced in our sample. The sample can be downloaded from the following link.
ColorPalleteJS.zip

Could you please let us know the version of Essential JavaScript you are using? Because this feature is available from Essential JavaScript version 12.2.0.36. The information provided would be of great help in providing a solution.

Please let us know if you have any concern.

Regards,
Anand

Loader.
Live Chat Icon For mobile
Up arrow icon