define( [
            'dojo/query',
            'dojox/charting/Chart',
            'dojox/charting/axis2d/Default',
            'dojox/charting/plot2d/Bubble',
            'dojo/NodeList-dom'
        ],
        function( query, Chart ) {
/**
 * Ruler, with ticks and numbers, drawn with HTML elements. Can be
 * stretched to any length.
 *
 * @class
 * @constructor
 *
 * @param {Number} args.min
 * @param {Number} args.max
 * @param {String} [args.direction="up"] The direction of increasing numbers.
 *   Either "up" or "down".
 *
 */

function Ruler(args) {
    dojo.mixin( this, args );
};

Ruler.prototype.render_to = function( target_div ) {
    if( typeof target_div == 'string' )
        target_div = dojo.byId( target_div );

    var target_dims = dojo.coords( target_div );


    // make an inner container that's styled to compensate for the
    // 12px edge-padding that dojox.charting has builtin that we can't
    // change, making the tick marks align correctly with the images
    var label_digits = Math.floor( Math.log(this.max+1)/Math.log(10))+1;

    var container = dojo.create(
        'div', {
            style: {
                   position: 'absolute',
                   left: "-9px",
                   bottom: "-14px",
                   width: (40+4*label_digits)+"px",
                   height: (target_dims.h+27)+"px",
                   overflow: 'hidden'
            }
        },
        target_div );

    try {
        var chart1 = new Chart( container, {fill: 'transparent'} );
        chart1.addAxis( "y", {
                            vertical: true,
                            fill: 'transparent',
                            min: this.min,
                            max: this.max,
                            fixLower: this.fixBounds ? 'major' : 'none',
                            fixUpper: this.fixBounds ? 'major' : 'none'
                            // minorTickStep: 0.5,
                            // majorTickStep: 1
                            //labels: [{value: 1, text: "One"}, {value: 3, text: "Ten"}]
                        });
        chart1.addPlot("default", {type: "Bubble", fill: 'transparent'});
        chart1.render();

        // hack to remove undesirable opaque white rectangles
        query('svg rect', container ).orphan();

        this.scaler = chart1.axes.y.scaler;
    } catch (x) {
        console.error(x+'');
        console.error("Failed to draw Ruler with SVG, your browser may not support the necessary technology.");
        target_div.removeChild( container );
    }
};

return Ruler;
});
@@ -2243,16 +2243,56 @@
 ctangles
+.  do%0A        // this a little bit later
 %0A       
@@ -2311,24 +2311,29 @@
 rect', c
-ontainer
+hart1.domNode
  ).orpha

clean up stray svg rects using the chart's domNode, seems to be more reliable in different browsers