How to use lineupjs - 4 common examples

To help you get started, we’ve selected a few lineupjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Kitware / candela / packages / lineup / src / LineUp / index.js View on Github external
delete spec.dataspec.file;
    delete spec.dataspec.separator;
    spec.dataspec.data = dataset;
    spec.storage = LineUpJS.createLocalStorage(dataset, LineUpJS.deriveColors(desc.columns));
    let config = ((lineupObj ? lineupObj.config : $.extend({}, this.lineUpConfig)) || {});
    if (!config.renderingOptions) {
      config.renderingOptions = {};
    }
    let oldAnimation = config.renderingOptions.animation;
    config.renderingOptions.animation = false;
    let columnFixed = 5;
    let scale = this.createLineupAdjustWidth(elem, name, spec, columnFixed);
    /* Always recreate the control */
    $(elem).empty();
    /* Lineup takes a d3 element */
    lineupObj = LineUpJS.create(spec.storage, d3.select(elem), this.lineUpConfig);
    lineupObj.restore(desc);
    config = lineupObj.config;
    lineupObj.header.dragHandler.on('dragend.lineupWidget', (evt) => {
      this.lineupDragColumnEnd(name, evt);
    });
    lineupObj['column-scale'] = scale;
    lineupObj['column-fixed'] = columnFixed;
    lineupObj['lineup-key'] = name;
    $(elem).attr('lineup-key', name);
    if (sort) {
      let sortColumn;
      $.each(lineupObj.data.getRankings(), function (ridx, ranking) {
        $.each(ranking.flatColumns, function (cidx, column) {
          if (column.label === sort) {
            sortColumn = column.id;
          }
github Kitware / candela / packages / lineup / src / LineUp / index.js View on Github external
createLineup (elem, name, desc, dataset, lineupObj, sort, selectCallback) {
    let spec = {};
    spec.name = name;
    spec.dataspec = desc;
    delete spec.dataspec.file;
    delete spec.dataspec.separator;
    spec.dataspec.data = dataset;
    spec.storage = LineUpJS.createLocalStorage(dataset, LineUpJS.deriveColors(desc.columns));
    let config = ((lineupObj ? lineupObj.config : $.extend({}, this.lineUpConfig)) || {});
    if (!config.renderingOptions) {
      config.renderingOptions = {};
    }
    let oldAnimation = config.renderingOptions.animation;
    config.renderingOptions.animation = false;
    let columnFixed = 5;
    let scale = this.createLineupAdjustWidth(elem, name, spec, columnFixed);
    /* Always recreate the control */
    $(elem).empty();
    /* Lineup takes a d3 element */
    lineupObj = LineUpJS.create(spec.storage, d3.select(elem), this.lineUpConfig);
    lineupObj.restore(desc);
    config = lineupObj.config;
    lineupObj.header.dragHandler.on('dragend.lineupWidget', (evt) => {
      this.lineupDragColumnEnd(name, evt);
github Kitware / candela / components / LineUp / index.js View on Github external
delete spec.dataspec.file;
    delete spec.dataspec.separator;
    spec.dataspec.data = dataset;
    spec.storage = LineUpJS.createLocalStorage(dataset, LineUpJS.deriveColors(desc.columns));
    let config = ((lineupObj ? lineupObj.config : $.extend({}, this.lineUpConfig)) || {});
    if (!config.renderingOptions) {
      config.renderingOptions = {};
    }
    let oldAnimation = config.renderingOptions.animation;
    config.renderingOptions.animation = false;
    let columnFixed = 5;
    let scale = this.createLineupAdjustWidth(elem, name, spec, columnFixed);
    /* Always recreate the control */
    $(elem).empty();
    /* Lineup takes a d3 element */
    lineupObj = LineUpJS.create(spec.storage, d3.select(elem), this.lineUpConfig);
    lineupObj.restore(desc);
    config = lineupObj.config;
    lineupObj.header.dragHandler.on('dragend.lineupWidget', (evt) => {
      this.lineupDragColumnEnd(name, evt);
    });
    lineupObj['column-scale'] = scale;
    lineupObj['column-fixed'] = columnFixed;
    lineupObj['lineup-key'] = name;
    $(elem).attr('lineup-key', name);
    if (sort) {
      let sortColumn;
      $.each(lineupObj.data.getRankings(), function (ridx, ranking) {
        $.each(ranking.flatColumns, function (cidx, column) {
          if (column.label === sort) {
            sortColumn = column.id;
          }
github Kitware / candela / components / LineUp / index.js View on Github external
createLineup (elem, name, desc, dataset, lineupObj, sort, selectCallback) {
    let spec = {};
    spec.name = name;
    spec.dataspec = desc;
    delete spec.dataspec.file;
    delete spec.dataspec.separator;
    spec.dataspec.data = dataset;
    spec.storage = LineUpJS.createLocalStorage(dataset, LineUpJS.deriveColors(desc.columns));
    let config = ((lineupObj ? lineupObj.config : $.extend({}, this.lineUpConfig)) || {});
    if (!config.renderingOptions) {
      config.renderingOptions = {};
    }
    let oldAnimation = config.renderingOptions.animation;
    config.renderingOptions.animation = false;
    let columnFixed = 5;
    let scale = this.createLineupAdjustWidth(elem, name, spec, columnFixed);
    /* Always recreate the control */
    $(elem).empty();
    /* Lineup takes a d3 element */
    lineupObj = LineUpJS.create(spec.storage, d3.select(elem), this.lineUpConfig);
    lineupObj.restore(desc);
    config = lineupObj.config;
    lineupObj.header.dragHandler.on('dragend.lineupWidget', (evt) => {
      this.lineupDragColumnEnd(name, evt);

lineupjs

LineUp is an interactive technique designed to create, visualize and explore rankings of items based on a set of heterogeneous attributes.

BSD-3-Clause
Latest version published 5 months ago

Package Health Score

68 / 100
Full package analysis