<!DOCTYPE html >
<html>
<head>
    <link rel="stylesheet" href="demos.css" type="text/css" media="screen" />
    
    <script src="../libraries/RGraph.common.core.js" ></script>
    <script src="../libraries/RGraph.common.dynamic.js" ></script>
    <script src="../libraries/RGraph.common.tooltips.js" ></script>
    <script src="../libraries/RGraph.common.key.js" ></script>
    <script src="../libraries/RGraph.hbar.js" ></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <!--[if lt IE 9]><script src="../excanvas/excanvas.js"></script><![endif]-->
    
    <title>A grouped horizontal bar chart</title>
    
    <meta name="description" content="This is a Horizontal Bar chart that shows grouped data" />
     
</head>
<body>

    <h1>A grouped horizontal bar chart</h1>
    
    <p>
        This horizontal Bar chart demonstrates the new vmargin and vmargin.grouped settings. The vmargin is either 
        side of the group of bars whilst vmargin.grouped is between the bars in that group.
    </p>

   <canvas id="cvs" width="600" height="600">[No canvas support]</canvas>

   <script>
       $(document).ready(function ()
       {
            var hbar = new RGraph.HBar({
                id: 'cvs',
                data: [[8,6,4,3], [4,8,3,5],[4,9,9,7],[6,5,3,4],[3,7,8,8]],
                options: {
                    grouping: 'grouped',
                    hmargin: 20,
                    labels: ['Charlie','Jake','Luis','Jack','Bernie'],
                    key: {
                        self: ['Monday','Tuesday','Wednesday','Thursday'],
                        position: {
                            self: 'gutter',
                            gutter: {
                                boxed: false
                            }
                        },
                        colors: ['#3366CC','#DC3912','#FF9900','#109618']
                    },
                    colors: [
                             'Gradient(white:#3366CC:#3366CC)',
                             'Gradient(white:#DC3912:#DC3912)',
                             'Gradient(white:#FF9900:#FF9900)',
                             'Gradient(white:#109618:#109618)'
                            ],
                    tooltips: [
                               'Monday','Tuesday','Wednesday','Thursday',
                               'Monday','Tuesday','Wednesday','Thursday',
                               'Monday','Tuesday','Wednesday','Thursday',
                               'Monday','Tuesday','Wednesday','Thursday',
                               'Monday','Tuesday','Wednesday','Thursday'
                              ]
                }
            }).draw();
       })
   </script>

    <p>
        <a href="./">&laquo; Back</a>
    </p>

</body>
</html>