This uses the relatively recent addition to canvas from the canvas v5 specification - native dotted and dashed lines. In somewhat limited testing it worked in Chrome, Firefox and Internet Explorer 11.
backgroundGridDashed: true, backgroundGridDotted: trueThis goes in the documents header:
<script src="RGraph.common.core.js"></script> <script src="RGraph.gantt.js"></script>Put this where you want the chart to show up:
<canvas id="cvs1" width="600" height="250">[No canvas support]</canvas> <canvas id="cvs2" width="600" height="250">[No canvas support]</canvas>This is the code that generates the chart:
<script> new RGraph.Gantt({ id: 'cvs1', data: [ {start: 0, duration: 5, complete: 50, label: 'Richard'}, {start: 3, duration: 2, complete: 25, label: 'John'}, {start: 3, duration: 2, complete: 10, label: 'Freed'} ], options: { xaxisLabels: ['Monday','Tuesday','Wednesday','Thursday','Friday'], xaxisScaleMax: 5, title: 'A dashed background grid', titleY: 25, backgroundGridDashed: true, marginRight: 45 } }).draw(); new RGraph.Gantt({ id: 'cvs2', data: [ {start: 0, duration: 5, complete: 50, label: 'Richard'}, {start: 3, duration: 2, complete: 25, label: 'John'}, {start: 3, duration: 2, complete: 10, label: 'Freed'} ], options: { xaxisLabels: ['Monday','Tuesday','Wednesday','Thursday','Friday'], xaxisScaleMax: 5, title: 'A dotted background grid', titleY: 25, backgroundGridDotted: true, marginRight: 45 } }).draw(); </script>