Code coverage report for src/compile/group.js

Statements: 100% (4 / 4)      Branches: 88.89% (16 / 18)      Functions: 100% (1 / 1)      Lines: 100% (4 / 4)      Ignored: none     

All files » src/compile/ » group.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26    1       1 6 6                                  
'use strict';
 
module.exports = {
  def: groupdef
};
 
function groupdef(name, opt) {
  opt = opt || {};
  return {
    _name: name || undefined,
    type: 'group',
    from: opt.from,
    properties: {
      enter: {
        x: opt.x || undefined,
        y: opt.y || undefined,
        width: opt.width || {group: 'width'},
        height: opt.height || {group: 'height'}
      }
    },
    scales: opt.scales || undefined,
    axes: opt.axes || undefined,
    marks: opt.marks || []
  };
}