Problem with Bar chart colors with a 2D dataset

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Mrinal on 19th November 2016
I have created a two dimensional array Bar Chart.I need two different colors for the Bar Chart.But the problem is that all the Bar chart have the same code is-
<script type="text/javascript">

         function DrawBarGraph(x, y) {
        var bar = new RGraph.Bar({
                 id: 'cvs',
                 data: y,

                 options: {
                     colors: ['Gradient(pink:red:#f33)', 'Gradient(green:#0f0)'],
                     shadow: true,
                     shadowBlur: 15,
                     shadowOffsetx: 0,
                     shadowOffsety: 0,
                     shadowColor: '#aaa',
                     strokestyle: 'rgba(0,0,0,0)',
                     textAccessible: true,
                     key: ['Achieved', 'Target'],
                     keyTextSize: 14,
                     keyPosition: 'gutter',
                     gutterTop: 35,
                     gutterLeft: 35,
                     title: 'Availability',
                     labels: x,
                     labelsAbove: true,
                     labelsAboveDecimals: 2
Posted by Richard on 19th November 2016
Hi there,

Well here's an example of a basic grouped Bar chart that shows 2D data:

Posted by Mrinal on 21st November 2016
Thanks for your help..

Add a reply

« Back to message list