How to create Bubble charts

A guide for using the Scatter chart to create Bubble charts.

[No canvas support]

Bubble charts can be created using the Scatter chart. It's an additional object that must be created that uses the Scatter chart and creates the "bubbles" on top of those coordinates.

The necessary source code is shown below.

  1. Create the Scatter chart but don't call .draw().
  2. Create the Bubble chart object.
  3. Call the .draw() method on this object instead.

    window.onload = function (e)
        var scatter = new RGraph.Scatter({
            id: 'cvs',
            data: [
            options: {
                xmax: 365,
                textAccessible: true,
                textSize: 14,
                labels: ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']

        var bubble = new RGraph.Scatter.Bubble(
            0,  // Minimum
            50, // Max width