Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
igCategoryChart with columns style set different colours
posted

Hello,

I have a column chart which is going to have multiple column and I want to be able to set a different colour for each individual.

Any idea what is going wrong?

I already define the brushes but as you can see it does not work.

<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>Bar and Column Series</title>
        rel="stylesheet" />
        rel="stylesheet" />
    <script src="">ajax.aspnetcdn.com/.../modernizr-2.8.3.js"></script>
    <script src="">code.jquery.com/jquery-1.11.3.min.js"></script>
    <script src="">code.jquery.com/.../jquery-ui.min.js"></script>
    <script src="">www.igniteui.com/.../adventureworks.min.js"></script>
</head>

<body>
    <script type="text/javascript">
        var Data = [[{ "Label""test1""Value"77.78 }, { "Label""test2""Value"83.33 }]];
        var columnColors = ["red""green"];
        $(function loaded() {
            $("#columnChart").igCategoryChart(
                {
                    brushes: columnColors,
                    width: "98%",
                    height: "350px",
                    dataSource: Data,
                    chartType: "column"
                }
            );
        }
        );
    </script>
    <div>
        <div id="columnChart" style="display: table-cell; width: auto; padding-right: 50px;"></div>
        <div id="columnLegend" style="width: 100px; display: table-cell;"></div>
    </div>
</body>
</html>