function createChart(suite) {
    var data = getData(suite);

    var config = {
      // Dimensions.
      width:    1024,
      height:   64 * data.length,
      // Margins.
      margin: {
        top:    36,
        right:  48,
        bottom: 24,
        left:   48
      },
      // Ticks.
      ticks:    10
    };

    // Scales.
    config.x = d3.scale.linear()
      .domain([0, d3.max(data, function (d, i) { return d.value; })])
      .rangeRound([0, config.width - (config.margin.left + config.margin.right)]);
    config.y = d3.scale.ordinal()
      .domain(d3.range(data.length))
      .rangeRoundBands([config.margin.top, config.height - config.margin.bottom], 0.5);

    // Bounds.
    config.left   = config.margin.left;
    config.right  = config.width - config.margin.right;
    config.top    = config.margin.top + (config.y.rangeBand() / 2);
    config.bottom = config.height - config.margin.bottom - (config.y.rangeBand() / 2);

    // Chart (empty it in case it already existed).
    var chart = emptyElement(
      getElement(formatString('div#suite_{0}.suite>div#chart_{0}.chart', suite.id))
    );
    var cont  = createContainer(chart, config, data);
    var bars  = addBars(cont, config, data);
    var ticks = addTicks(cont, config, data);
    var axes  = addAxes(cont, config, data);

    return chart;
  }
// Creates a chart with the results from the suite.
Creates a chart with the results from the suite.
Creates a chart with the results from the suite .
function createChart(suite) {
    var data = getData(suite);
    var config = {
      width:    1024,
      height:   64 * data.length,
      margin: {
        top:    36,
        right:  48,
        bottom: 24,
        left:   48
      },
      ticks:    10
    };
    config.x = d3.scale.linear()
      .domain([0, d3.max(data, function (d, i) { return d.value; })])
      .rangeRound([0, config.width - (config.margin.left + config.margin.right)]);
    config.y = d3.scale.ordinal()
      .domain(d3.range(data.length))
      .rangeRoundBands([config.margin.top, config.height - config.margin.bottom], 0.5);
    config.left   = config.margin.left;
    config.right  = config.width - config.margin.right;
    config.top    = config.margin.top + (config.y.rangeBand() / 2);
    config.bottom = config.height - config.margin.bottom - (config.y.rangeBand() / 2);
    var chart = emptyElement(
      getElement(formatString('div#suite_{0}.suite>div#chart_{0}.chart', suite.id))
    );
    var cont  = createContainer(chart, config, data);
    var bars  = addBars(cont, config, data);
    var ticks = addTicks(cont, config, data);
    var axes  = addAxes(cont, config, data);
    return chart;
  }
function createChart ( suite ) { var data = getData ( suite ) ; var config = { width : 1024 , height : 64 * data . length , margin : { top : 36 , right : 48 , bottom : 24 , left : 48 } , ticks : 10 } ; config . x = d3 . scale . linear ( ) . domain ( [ 0 , d3 . max ( data , function ( d , i ) { return d . value ; } ) ] ) . rangeRound ( [ 0 , config . width - ( config . margin . left + config . margin . right ) ] ) ; config . y = d3 . scale . ordinal ( ) . domain ( d3 . range ( data . length ) ) . rangeRoundBands ( [ config . margin . top , config . height - config . margin . bottom ] , 0.5 ) ; config . left = config . margin . left ; config . right = config . width - config . margin . right ; config . top = config . margin . top + ( config . y . rangeBand ( ) / 2 ) ; config . bottom = config . height - config . margin . bottom - ( config . y . rangeBand ( ) / 2 ) ; var chart = emptyElement ( getElement ( formatString ( 'div#suite_{0}.suite>div#chart_{0}.chart' , suite . id ) ) ) ; var cont = createContainer ( chart , config , data ) ; var bars = addBars ( cont , config , data ) ; var ticks = addTicks ( cont , config , data ) ; var axes = addAxes ( cont , config , data ) ; return chart ; }
Creates a chart with the results from the suite.
Creates a chart with the results from the suite .
// Dimensions. // Margins. // Ticks. // Scales. // Bounds. // Chart (empty it in case it already existed).