Code Monkey home page Code Monkey logo

lineupjsx's Introduction

LineUp.js: Visual Analysis of Multi-Attribute Rankings

License NPM version Github Actions

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

Key Features

  • scalable (~1M rows)
  • heterogenous attribute types (string, numerical, categorical, boolean, date)
  • composite column types (weighted sum, min, max, mean, median, impose, nested, ...)
  • array (multi value) and map column types (strings, stringMap, numbers, numberMap, ...)
  • filtering capabilities
  • hierarchical sorting (sort by more than one sorting criteria)
  • hierarchical grouping (split rows in multiple separate groups)
  • group aggregations (show a whole group as a single group row)
  • numerous visualizations for summaries, cells, and group aggregations
  • side panel for easy filtering and column management
  • React, Angular, Vue.js, Polymer, RShiny, Juypter, ObservableHQ, and Power BI wrapper
  • Demo Application with CSV import and export capabilities
  • API Documentation based on generated TypeDoc documenation

Usage

Installation

npm install lineupjs
<link href="https://unpkg.com/lineupjs/build/LineUpJS.css" rel="stylesheet" />
<script src="https://unpkg.com/lineupjs/build/LineUpJS.js"></script>

Minimal Usage Example

// generate some data
const arr = [];
const cats = ['c1', 'c2', 'c3'];
for (let i = 0; i < 100; ++i) {
  arr.push({
    a: Math.random() * 10,
    d: 'Row ' + i,
    cat: cats[Math.floor(Math.random() * 3)],
    cat2: cats[Math.floor(Math.random() * 3)],
  });
}
const lineup = LineUpJS.asLineUp(document.body, arr);

CodePen

Minimal Result

Advanced Usage Example

// arr from before
const builder = LineUpJS.builder(arr);

// manually define columns
builder
  .column(LineUpJS.buildStringColumn('d').label('Label').width(100))
  .column(LineUpJS.buildCategoricalColumn('cat', cats).color('green'))
  .column(LineUpJS.buildCategoricalColumn('cat2', cats).color('blue'))
  .column(LineUpJS.buildNumberColumn('a', [0, 10]).color('blue'));

// and two rankings
const ranking = LineUpJS.buildRanking()
  .supportTypes()
  .allColumns() // add all columns
  .impose('a+cat', 'a', 'cat2'); // create composite column
  .groupBy('cat')
  .sortBy('a', 'desc')


builder
  .defaultRanking()
  .ranking(ranking);

const lineup = builder.build(document.body);

CodePen

Advanced Result

Supported Browsers

  • Chrome 64+ (best performance)
  • Firefox 57+
  • Edge 16+

Demo Application

A demo application is located at lineup_app. It support CSV Import, CSV Export, JSON Export, CodePen Export, nad local data management.

The application is deployed at https://lineup.js.org/app

Screenshot

API Documentation

LineUp is implemented in clean TypeScript in an object oriented manner. A fully generated API documentation based on TypeDoc is available at https://lineup.js.org/main/docs

LineUp can be build manually or using via the builder design pattern (see Advanced Usage Example). The builder design pattern in the more common way.

LineUp Builder

The simplest methods to create a new instance are:

  • asLineUp returning a ready to use LineUp instance
    asLineUp(node: HTMLElement, data: any[], ...columns: string[]): LineUp
  • asTaggle returning a ready to use Taggle instance
    asTaggle(node: HTMLElement, data: any[], ...columns: string[]): Taggle
  • builder returning a new DataBuilder
    builder(arr: any[]): DataBuilder`

The DataBuilder allows on the one hand to specify the individual columns more specificly and the creation of custom rankings.

Builder factory functions for creating column descriptions include:

In order to build custom rankings within the DataBuilder the buildRanking returning a new RankingBuilder is used.

buildRanking(): RankingBuilder

LineUp classes and manual creation

The relevant classes for creating a LineUp instance manually are LineUp, Taggle, and LocalDataProvider. A LocalDataProvider is an sub class of ADataProvider implementing the data model management based on a local JavaScript array. LineUp and Taggle are the visual interfaces to the LocalDataProvider.

The classes can be instantiated either using the factory pattern or via their regular class constructors:

createLineUp(container: HTMLElement, data: ADataProvider, config?: Partial<ILineUpOptions>): LineUp

createTaggle(container: HTMLElement, data: ADataProvider, config?: Partial<ITaggleOptions>): Taggle

createLocalDataProvider(data: any[], columns: IColumnDesc[], options?: Partial<ILocalDataProviderOptions>): LocalDataProvider
new LineUp(node: HTMLElement, data: DataProvider, options?: Partial<ILineUpOptions>): LineUp
new Taggle(node: HTMLElement, data: DataProvider, options?: Partial<ITaggleOptions>): Taggle
new LocalDataProvider(data: any[], columns?: IColumnDesc[], options?: Partial<ILocalDataProviderOptions & IDataProviderOptions>): LocalDataProvider

Both LineUp and Taggle are sub classes of ALineUp. The most important functions of this class include:

React Support (LineUp.jsx)

A React wrapper is located at lineupjsx.

Installation

npm install --save lineupjsx
<link href="https://unpkg.com/lineupjsx/build/LineUpJSx.css" rel="stylesheet" />
<script src="https://unpkg.com/lineupjsx/build/LineUpJSx.js"></script>

Minimal Usage Example

// generate some data
const arr = [];
const cats = ['c1', 'c2', 'c3'];
for (let i = 0; i < 100; ++i) {
  arr.push({
    a: Math.random() * 10,
    d: 'Row ' + i,
    cat: cats[Math.floor(Math.random() * 3)],
    cat2: cats[Math.floor(Math.random() * 3)],
  });
}
<LineUp data={arr} />

CodePen

Result is same as the builder minimal example

Advanced Usage Example

// arr from before
<LineUp data={arr} defaultRanking>
  <LineUpStringColumnDesc column="d" label="Label" width={100} />
  <LineUpCategoricalColumnDesc column="cat" categories={cats} color="green" />
  <LineUpCategoricalColumnDesc column="cat2" categories={cats} color="blue" />
  <LineUpNumberColumnDesc column="a" domain={[0, 10]} color="blue" />

  <LineUpRanking groupBy="cat" sortBy="a:desc">
    <LineUpSupportColumn type="*" />
    <LineUpColumn column="*" />
    <LineUpImposeColumn label="a+cat" column="a" categeoricalColumn="cat2" />
  </LineUpRanking>
</LineUp>

CodePen

Result is same as the builder advanced example

Angular 6 Support (nglineup)

An Angular wrapper is located at nglineup.

Installation

npm install --save nglineup

Minimal Usage Example

app.module.ts:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { LineUpModule } from '../lib/lineup.module';

import { AppComponent } from './app.component.1';

@NgModule({
  declarations: [AppComponent],
  imports: [BrowserModule, LineUpModule],
  providers: [],
  bootstrap: [AppComponent],
})
export class AppModule {}

app.component.ts:

import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
})
export class AppComponent {
  readonly data = <any[]>[];

  readonly cats = ['c1', 'c2', 'c3'];

  constructor() {
    const cats = this.cats;
    for (let i = 0; i < 100; ++i) {
      this.data.push({
        a: Math.random() * 10,
        d: 'Row ' + i,
        cat: cats[Math.floor(Math.random() * 3)],
        cat2: cats[Math.floor(Math.random() * 3)],
      });
    }
  }
}

app.component.html:

<lineup-lineup [data]="data"></lineup-lineup>

CodePen

Result is same as the builder minimal example

Advanced Usage Example

app.component.html:

<lineup-lineup [data]="data" [defaultRanking]="true" style="height: 800px;">
  <lineup-string-column-desc column="d" label="Label" [width]="100"></lineup-string-column-desc>
  <lineup-categorical-column-desc column="cat" [categories]="cats" color="green"></lineup-categorical-column-desc>
  <lineup-categorical-column-desc column="cat2" [categories]="cats" color="blue"></lineup-categorical-column-desc>
  <lineup-number-column-desc column="a" [domain]="[0, 10]" color="blue"></lineup-number-column-desc>

  <lineup-ranking groupBy="cat" sortBy="a:desc">
    <lineup-support-column type="*"></lineup-support-column>
    <lineup-column column="*"></lineup-column>
    <lineup-impose-column label="a+cat" column="a" categoricalColumn="cat2"></lineup-impose-column>
  </lineup-ranking>
</lineup-lineup>

CodePen

Result is same as the builder advanced example

Vue.js Support (vue-lineup)

A Vue.js wrapper is located at vue-lineup.

Installation

npm install --save vue-lineup

Minimal Usage Example

const cats = ['c1', 'c2', 'c3'];
const data = [];
for (let i = 0; i < 100; ++i) {
  data.push({
    a: Math.random() * 10,
    d: 'Row ' + i,
    cat: cats[Math.floor(Math.random() * 3)],
    cat2: cats[Math.floor(Math.random() * 3)],
  });
}

// enable plugin to register components
Vue.use(VueLineUp);

const app = new Vue({
  el: '#app',
  template: `<LineUp v-bind:data="data" />`,
  data: {
    cats,
    data,
  },
});

CodePen

Result is same as the builder minimal example

Advanced Usage Example

const app = new Vue({
  el: '#app',
  template: `<LineUp v-bind:data="data" defaultRanking="true" style="height: 800px">
    <LineUpStringColumnDesc column="d" label="Label" v-bind:width="100" />
    <LineUpCategoricalColumnDesc column="cat" v-bind:categories="cats" color="green" />
    <LineUpCategoricalColumnDesc column="cat2" v-bind:categories="cats" color="blue" />
    <LineUpNumberColumnDesc column="a" v-bind:domain="[0, 10]" color="blue" />
    <LineUpRanking groupBy="cat" sortBy="a:desc">
      <LineUpSupportColumn type="*" />
      <LineUpColumn column="*" />
    </LineUpRanking>
  </LineUp>`,
  data: {
    cats,
    data,
  },
});

CodePen

Result is same as the builder advanced example

Polymer Support (LineUp-Element)

A Polymer 2.0 web component wrapper is located at lineup-element.

Installation

bower install https://github.com/lineupjs/lineup-element
<link rel="import" href="bower_components/lineup-element/lineup-element.html" />

Minimal Usage Example

// generate some data
const arr = [];
const cats = ['c1', 'c2', 'c3'];
for (let i = 0; i < 100; ++i) {
  arr.push({
    a: Math.random() * 10,
    d: 'Row ' + i,
    cat: cats[Math.floor(Math.random() * 3)],
    cat2: cats[Math.floor(Math.random() * 3)]
  })
}
conat data = { arr, cats };
<lineup-element data="[[data.arr]]"></lineup-element>

TODO CodePen

Result is same as the builder minimal example

Advanced Usage Example

// arr from before
<lineup-element data="[[data.arr]]" side-panel side-panel-collapsed default-ranking="true">
  <lineup-string-desc column="d" label="Label" width="100"></lineup-string-desc>
  <lineup-categorical-desc column="cat" categories="[[cats]]" color="green"></lineup-categorical-desc>
  <lineup-categorical-desc column="cat2" categories="[[cats]]" color="blue"></lineup-categorical-desc>
  <lineup-number-desc column="a" domain="[0, 10]" color="blue"></lineup-number-desc>
  <lineup-ranking group-by="cat" sort-by="a:desc">
    <lineup-support-column type="*"></lineup-support-column>
    <lineup-column column="*"></lineup-column>
  </lineup-ranking>
</lineup-element>

TODO CodePen

Result is same as the builder advanced example

R, RShiny, and R Markdown Support

A HTMLWidget wrapper for R is located at lineup_htmlwidget. It can be used within standalone R Shiny apps or R Markdown files. Integrated plotting does not work due to an outdated integrated Webkit version in RStudio. Crosstalk is supported for synching selections and filtering among widgets.

Installation

devtools::install_github("rstudio/crosstalk")
devtools::install_github("lineupjs/lineup_htmlwidget")
library(lineupjs)

Examples

lineup(iris)

iris output

Jupyter Widget (to be released)

A Jupyter Widget wrapper for Python is located at lineup_widget.

Installation

pip install -e git+https://github.com/lineupjs/lineup_widget.git#egg=lineup_widget
jupyter nbextension enable --py [--sys-prefix|--user|--system] lineup_widget

Or, if you use jupyterlab:

pip install -e git+https://github.com/lineupjs/lineup_widget.git#egg=lineup_widget
jupyter labextension install @jupyter-widgets/jupyterlab-manager

Examples

Launch Binder

import lineup_widget
import pandas as pd
import numpy as np

df = pd.DataFrame(np.random.randint(0,100,size=(100, 4)), columns=list('ABCD'))

w = lineup_widget.LineUpWidget(df)
w.on_selection_changed(lambda selection: print(selection))
w

simple usage

from __future__ import print_function
from ipywidgets import interact, interactive, interact_manual

def selection_changed(selection):
    return df.iloc[selection]

interact(selection_changed, selection=lineup_widget.LineUpWidget(df));

interact example

Observable HQ

A ObservableHQ wrapper is located at lineup-js-observable.

data = {
  const arr = [];
  const cats = ['c1', 'c2', 'c3'];
  for (let i = 0; i < 100; ++i) {
    arr.push({
      a: Math.random() * 10,
      d: 'Row ' + i,
      cat: cats[Math.floor(Math.random() * 3)],
      cat2: cats[Math.floor(Math.random() * 3)]
    })
  }
  return arr;
}
import { asLineUp } from '@sgratzl/lineup-js-observable-library';
viewof selection = asLineUp(arr)

ObservableHQ

Minimal Result

Advanced Usage Example

// arr from before
viewof selection = {
  const b = builder(data);
  b.column(
    LineUpJS.buildStringColumn('d')
      .label('Label')
      .width(100)
  )
    .column(LineUpJS.buildCategoricalColumn('cat', cats).color('green'))
    .column(LineUpJS.buildCategoricalColumn('cat2', cats).color('blue'))
    .column(LineUpJS.buildNumberColumn('a', [0, 10]).color('blue'));

  // and two rankings
  const ranking = LineUpJS.buildRanking()
    .supportTypes()
    .allColumns() // add all columns
    .impose('a+cat', 'a', 'cat2') // create composite column
    .groupBy('cat')
    .sortBy('a', 'desc');

  b.defaultRanking().ranking(ranking);
  return b.build();
}

ObservableHQ

Advanced Result

PowerBI Custom Visual (under development)

A PowerBI Visual wrapper is located at lineup_powerbi.

Installation

TODO

Examples

TODO

API Documentation

See API documentation and Develop API documentation

Demos

See Demos, Develop Demos, and R Demos

Related Publications

LineUp: Visual Analysis of Multi-Attribute Rankings Paper Paper Website

Samuel Gratzl, Alexander Lex, Nils Gehlenborg, Hanspeter Pfister, and Marc Streit
IEEE Transactions on Visualization and Computer Graphics (InfoVis '13), 19(12), pp. 2277–2286, doi:10.1109/TVCG.2013.173, 2013.

🏆 IEEE VIS InfoVis 2013 Best Paper Award

Taggle: Scalable Visualization of Tabular Data through Aggregation Paper Preprint Paper Website

Katarina Furmanova, Samuel Gratzl, Holger Stitz, Thomas Zichner, Miroslava Jaresova, Martin Ennemoser, Alexander Lex, and Marc Streit
Information Visualization, 19(2): 114-136, doi:10.1177/1473871619878085, 2019.

Dependencies

LineUp.js depends on

Development Dependencies

Webpack is used as build tool. LineUp itself is written in TypeScript and SASS.

Development Environment

Installation

The setup requires Node.js v16 or higher.

git clone https://github.com/lineupjs/lineupjs.git -b develop
cd lineupjs
npm i -g yarn
yarn install
yarn sdks vscode

Common commands

yarn start
yarn run clean
yarn run compile
yarn test
yarn run lint
yarn run fix
yarn run build
yarn run docs

Run E2E Tests

via cypress.io

Variant 1: with prebuilt LineUp

yarn run compile
yarn run build
yarn run cy:compile
yarn run cy:open

Variant 2: with webpack-dev-server

first shell:

yarn start

second shell:

yarn run cy:compile
yarn run cy:start

Authors

  • Samuel Gratzl (@sgratzl)
  • Holger Stitz (@thinkh)
  • The Caleydo Team (@caleydo)
  • datavisyn GmbH (@datavisyn)

This repository was created as part of the The Caleydo Project.

lineupjsx's People

Contributors

dependabot[bot] avatar moritzschaefer avatar sgratzl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

moritzschaefer

lineupjsx's Issues

create-react-app requires ES5 precompilation

  • Release number or git hash:
  • Web browser version and OS:

Steps to reproduce

  1. Use lineupjsx in your create-react-app project
  2. Run "npm run build"

Observed behavior

npm run build

fails:

└─(14:56:54 on master ✹ ✭)──> npm run build ──(Mo,Apr30)─┘

[email protected] build /home/moritz/Projects/credit/webapp
react-scripts-ts build

Creating an optimized production build...
Warning: The 'no-use-before-declare' rule requires type information.
ts-loader: Using [email protected] and /home/moritz/Projects/credit/webapp/tsconfig.json
Failed to compile.

Failed to minify the code from this file:

    ./node_modules/lineupjsx/build/LineUpJSx.js:1:2190

Read more here: http://bit.ly/2tRViJ9

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: react-scripts-ts build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

╭─────────────────────────────────────╮
│ │
│ Update available 5.8.0 → 6.0.0 │
│ Run npm i -g npm to update │
│ │
╰─────────────────────────────────────╯

npm ERR! A complete log of this run can be found in:
npm ERR! /home/moritz/.npm/_logs/2018-04-30T12_57_29_387Z-debug.log

Expected behavior

Does not fail.

create-react-app (http://bit.ly/2tRViJ9) states, that all third party libs need to be precompiled to ES5.

Is that feasible?

Compilation fails with subsequencent declarations warning

  • Release number or git hash: 1.0.0-beta.9

Observed behavior

Compilation in a create-react-app with lineupjsx as dependency results in the following error

> [email protected] build /home/moritz/Projects/credit/webapp
> react-scripts-ts build

Creating an optimized production build...
Warning: The 'no-use-before-declare' rule requires type information.
ts-loader: Using [email protected] and /home/moritz/Projects/credit/webapp/tsconfig.json
Failed to compile.

/home/moritz/Projects/credit/webapp/node_modules/lineupjsx/node_modules/@types/react/index.d.ts
(2249,13): error TS2403: Subsequent variable declarations must have the same type.  Variable 'a' must be of type 'DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>', but here has type 'DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>'.

Expected behavior

Compilation without error

main div has 0 height, causing no rows rendering

Version: 1.0.7
Here is an example of the code:
https://github.com/angelicalin/LineUpExample

  • Issue:

main div has 0 height, which cause the web app only has the header and the side bar, but no rows.

  • Attempt to fix:

Tried FireFox and Chrome, issue still exist.
Manually trying to input the height in Chrome inspect does not help either.
Tried the LineUpJS implementation instead of react wrapper, the issue still exist.

Visibility on Column (Question)

Is there a way to change visibility of a column to visible by default? The default right now is hover. I have tried <LineUpNumberColumnDesc style={{visibility: 'visible'}} ... /> but no luck.

Here is an example where End Date and Start Date are not visible unless hovering:
lineupjs_vis

Thanks!

Error in lineupjs dependency

Using
"lineupjs": "^3.0.1-beta.7",
"lineupjsx": "^1.0.0-beta.9",

in a create-react-app TS project fails

Observed behavior

npm run build fails:

/home/moritz/Projects/credit/webapp/node_modules/lineupjsx/node_modules/lineupjs/build/typings/ui/panel/SidePanel.d.ts
(5,70): error TS2304: Cannot find name 'SidePanelEntry'.

When running npm run build inside node_modules/lineupjsx/node_modules/lineupjs/ I get these errors:

> [email protected] compile /home/moritz/Projects/credit/webapp/node_modules/lineupjsx/node_modules/lineupjs
> tsc


../../../lineupjs/build/typings/model/NumberMapColumn.d.ts(1,10): error TS2305: Module '"/home/moritz/Projects/credit/webapp/node_modules/lineupjs/build/typings/internal/index"' has no exported member 'LazyBoxPlotData'.

1 import { LazyBoxPlotData } from '../internal';
           ~~~~~~~~~~~~~~~


../../../lineupjs/build/typings/model/NumbersColumn.d.ts(1,10): error TS2305: Module '"/home/moritz/Projects/credit/webapp/node_modules/lineupjs/build/typings/internal/index"' has no exported member 'LazyBoxPlotData'.

1 import { LazyBoxPlotData } from '../internal';
           ~~~~~~~~~~~~~~~


../../../lineupjs/build/typings/ui/EngineRanking.d.ts(7,24): error TS2305: Module '"/home/moritz/Projects/credit/webapp/node_modules/lineupjs/build/typings/ui/RenderColumn"' has no exported member 'IRenderers'.

7 import RenderColumn, { IRenderers } from './RenderColumn';
                         ~~~~~~~~~~


../../../lineupjs/build/typings/ui/EngineRanking.d.ts(19,62): error TS2304: Cannot find name 'RenderColumn'.

19 export default class EngineRanking extends ACellTableSection<RenderColumn> implements ITableSection {
                                                                ~~~~~~~~~~~~


../../../lineupjs/build/typings/ui/EngineRanking.d.ts(19,87): error TS2304: Cannot find name 'ITableSection'.

19 export default class EngineRanking extends ACellTableSection<RenderColumn> implements ITableSection {
                                                                                         ~~~~~~~~~~~~~


../../../lineupjs/build/typings/ui/EngineRanking.d.ts(41,99): error TS2304: Cannot find name 'GridStyleManager'.

41     constructor(ranking: Ranking, header: HTMLElement, body: HTMLElement, tableId: string, style: GridStyleManager, ctx: IEngineRankingContext, roptions?: Partial<IEngineRankingOptions>);
                                                                                                     ~~~~~~~~~~~~~~~~


../../../lineupjs/build/typings/ui/EngineRanking.d.ts(46,23): error TS2304: Cannot find name 'ICellRenderContext'.

46     readonly context: ICellRenderContext<RenderColumn>;
                         ~~~~~~~~~~~~~~~~~~


../../../lineupjs/build/typings/ui/EngineRanking.d.ts(46,42): error TS2304: Cannot find name 'RenderColumn'.

46     readonly context: ICellRenderContext<RenderColumn>;
                                            ~~~~~~~~~~~~


../../../lineupjs/build/typings/ui/EngineRanking.d.ts(47,57): error TS2304: Cannot find name 'RenderColumn'.

47     protected createHeader(_document: Document, column: RenderColumn): HTMLElement;
                                                           ~~~~~~~~~~~~


../../../lineupjs/build/typings/ui/EngineRanking.d.ts(48,55): error TS2304: Cannot find name 'RenderColumn'.

48     protected updateHeader(node: HTMLElement, column: RenderColumn): void;
                                                         ~~~~~~~~~~~~


../../../lineupjs/build/typings/ui/EngineRanking.d.ts(49,70): error TS2304: Cannot find name 'RenderColumn'.

49     protected createCell(_document: Document, index: number, column: RenderColumn): HTMLElement;
                                                                        ~~~~~~~~~~~~


../../../lineupjs/build/typings/ui/EngineRanking.d.ts(50,68): error TS2304: Cannot find name 'RenderColumn'.

50     protected updateCell(node: HTMLElement, index: number, column: RenderColumn): void | HTMLElement;
                                                                      ~~~~~~~~~~~~


../../../lineupjs/build/typings/ui/EngineRanking.d.ts(53,82): error TS2304: Cannot find name 'RenderColumn'.

53     protected updateCanvasCell(canvas: HTMLCanvasElement, index: number, column: RenderColumn, x: number): void;
                                                                                    ~~~~~~~~~~~~


../../../lineupjs/build/typings/ui/EngineRanking.d.ts(58,42): error TS2304: Cannot find name 'RenderColumn'.

58     updateHeaderOf(col: Column): false | RenderColumn;
                                            ~~~~~~~~~~~~


../../../lineupjs/build/typings/ui/EngineRanking.d.ts(71,59): error TS2304: Cannot find name 'IExceptionContext'.

71     render(data: (IGroupItem | IGroupData)[], rowContext: IExceptionContext): void;
                                                             ~~~~~~~~~~~~~~~~~


../../../lineupjs/build/typings/ui/EngineRenderer.d.ts(22,21): error TS2304: Cannot find name 'GridStyleManager'.

22     readonly style: GridStyleManager;
                       ~~~~~~~~~~~~~~~~


../../../lineupjs/build/typings/ui/SlopeGraph.d.ts(5,11): error TS2304: Cannot find name 'EMode'.

5     mode: EMode;
            ~~~~~


../../../lineupjs/build/typings/ui/SlopeGraph.d.ts(7,44): error TS2304: Cannot find name 'ITableSection'.

7 export default class SlopeGraph implements ITableSection {
                                             ~~~~~~~~~~~~~


../../../lineupjs/build/typings/ui/SlopeGraph.d.ts(23,11): error TS2304: Cannot find name 'EMode'.

23     mode: EMode;
             ~~~~~


../../../lineupjs/build/typings/ui/SlopeGraph.d.ts(28,61): error TS2304: Cannot find name 'IExceptionContext'.

28     rebuild(left: (IGroupItem | IGroupData)[], leftContext: IExceptionContext, right: (IGroupItem | IGroupData)[], rightContext: IExceptionContext): void;
                                                               ~~~~~~~~~~~~~~~~~


../../../lineupjs/build/typings/ui/SlopeGraph.d.ts(28,130): error TS2304: Cannot find name 'IExceptionContext'.

28     rebuild(left: (IGroupItem | IGroupData)[], leftContext: IExceptionContext, right: (IGroupItem | IGroupData)[], rightContext: IExceptionContext): void;
                                                                                                                                    ~~~~~~~~~~~~~~~~~


../../../lineupjs/build/typings/ui/index.d.ts(4,33): error TS2305: Module '"/home/moritz/Projects/credit/webapp/node_modules/lineupjs/build/typings/ui/SlopeGraph"' has no exported member 'EMode'.

4 export { default as SlopeGraph, EMode } from './SlopeGraph';
                                  ~~~~~


../../../lineupjs/build/typings/ui/panel/SidePanel.d.ts(5,70): error TS2304: Cannot find name 'SidePanelEntry'.

5 export interface ISidePanelOptions extends Partial<ISearchBoxOptions<SidePanelEntry>> {

I had observed this error in earlier versions already and we (@sgratzl ) had an email conversation about it already. Right now, downgrading the lineupjs package does not help unfortunately though.

Lineupjsx couldn't render the list

  • Release number or git hash: 1.0.0-beta.11
  • Web browser version and OS: macos 10.13.3 chrome 67

Steps to reproduce

  1. This is my code. I want to show a lineup demo in my browser
import React, { Component } from 'react';
import LineUp from 'lineupjsx'
import 'lineupjsx/build/LineUpJSx.css'
import './App.css'

class App extends Component {
  state = {
    arr: []
  }
  componentDidMount () {
    const arr = []
    for (let i = 0; i < 100; i++) {
      arr.push({
        attr1: Math.random() * 10,
        attr2: Math.random() * 10,
        attr3: Math.random() * 10,
      })
    }
    this.setState({ arr: arr })
  }
  render() {
    return (
      <div className="App">
        <div id="lineup">
          <h2>This is a Lineup list</h2>
          <div id="list">
            <LineUp data={this.state.arr} />
          </div>
        </div>
      </div>
    );
  }
}

export default App;

Observed behavior

  • Browser result:
    wechatimg401

  • Chrome dev tool consoles a error:
    wechatimg402

Expected behavior

  • I want to show a lineup demo by react and lineupjsx

Data rows and control sidebar not rendered

  • Release number or git hash: 4.0.0
  • Web browser version and OS: Firefox 91.0.2

Steps to reproduce

  1. Checkout code from hubmapconsortium/portal-ui#2112
  2. Run ./dev-start.sh
  3. Look at http://localhost:5001/lineup/donors

Observed behavior

  • Lots of Cannot find SourceMap warnings
  • No rows of data
  • No right-hand sidebar

Expected behavior

  • No warnings
  • Many rows of data
  • control sidebar on the right-hand-side

Screen Shot 2021-08-31 at 1 12 51 PM

Also, is there a way to use this without depending on a CDN for the CSS?

visibility error

  • Release number or git hash: 4.0.0
  • Web browser version and OS: Google Chrome Version 87.0.4280.141 on Windows 10

Steps to reproduce

  1. open react example in codepen: https://codepen.io/sgratzl/pen/yvJpWQ
  2. add <LineUpJS.LineUpCategoricalColumnDesc column="cat" categories={cats} color="green" visible={false} /> in the beginning
  3. try to remove a column that would come after the previously added one

Observed behavior

  • When adding the "visible={false}" property to a column description, it is not possible to delete any column that comes after this one without issue. When trying to delete such a column, it deletes the column after the selected one and sometimes there also occurs an error that causes the header to not render correctly anymore.
  • Uncaught TypeError: Cannot read property 'getOrderLength' of null at e.summaryCategoricalStatsD (DirectRenderTasks.js:154) at e.summaryCategoricalStats (DirectRenderTasks.js:127) at Object.update (CategoricalCellRenderer.js:92) at t.updateHeader (RenderColumn.js:109) at e.updateHeader (EngineRanking.js:256) at e.updateHeader (ACellTableSection.js:49) at ACellAdapter.js:366 at Array.forEach (<anonymous>) at e.t.recreate (ACellAdapter.js:364) at e.recreate (ACellTableSection.js:197) e.summaryCategoricalStatsD @ DirectRenderTasks.js:154 e.summaryCategoricalStats @ DirectRenderTasks.js:127 update @ CategoricalCellRenderer.js:92 t.updateHeader @ RenderColumn.js:109 e.updateHeader @ EngineRanking.js:256 e.updateHeader @ ACellTableSection.js:49 (anonymous) @ ACellAdapter.js:366 t.recreate @ ACellAdapter.js:364 e.recreate @ ACellTableSection.js:197 e.updateAll @ EngineRanking.js:479 (anonymous) @ EngineRanking.js:145 (anonymous) @ debounce.js:27 setTimeout (async) (anonymous) @ debounce.js:25 (anonymous) @ EngineRanking.js:156 apply @ dispatch.js:61 a @ AEventDispatcher.js:97 t.fireImpl @ AEventDispatcher.js:100 t.fire @ AEventDispatcher.js:74 e.remove @ Ranking.js:479 e.removeMe @ Column.js:253 onClick @ toolbar.js:155 u.onclick @ header.js:143 EngineRanking.js:299 Uncaught TypeError: Cannot read property 'width' of undefined at e.visibleRenderedWidth (EngineRanking.js:299) at e.updateShifts (EngineRanking.js:630) at e.updateSizer (ACellTableSection.js:126) at e.onScrolledHorizontally (ACellTableSection.js:170) at e.show (ACellTableSection.js:149) at MultiTableRowRenderer.js:54 at Array.forEach (<anonymous>) at t.onScrolledHorizontally (MultiTableRowRenderer.js:48) at MultiTableRowRenderer.js:32 at t.handle (scroll.js:55)
  • Static or animated images showing the UI behavior
    image

Expected behavior

  • remove column

image and action columns

hi,
some questions:

  1. Does the react wrapper allow to add image (from a url-link) as well as action columns?
  2. How do I define that a column should be used for sorting?
  3. How do I define that a column (e.g. a clustering column) should be used for stratification?
  4. Can a column have cells in the rows that contain an array of e.g. 100 float numbers and display as a heatmap?

Many thanks

cannot get lineupsjsx component to work

  • Release number or git hash:
  • Web browser version and OS:
    chrome Version 65.0.3325.181/macOS

Steps to reproduce

  1. generate react app using create-react-app
  2. use minimal usage example code from https://github.com/datavisyn/lineupjsx
class App extends Component {
    render() {

// generate some data
        const arr = [];
        const cats = ['c1', 'c2', 'c3'];
        for (let i = 0; i < 50; ++i) {
            arr.push({
                a: Math.random() * 10,
                d: 'Row ' + i,
                cat: cats[Math.floor(Math.random() * 3)],
                cat2: cats[Math.floor(Math.random() * 3)]
            })
        }
        return (
            <div className="App">
                <LineUp data={arr}/>
            </div>
        );
    }
}

Observed behavior

  • only see
    image
  • console output:
LineUpJSx.js:1 Uncaught TypeError: Cannot read property 'scrollLeft' of null
    at Ac.recreate (LineUpJSx.js:1)
    at Ac.render (LineUpJSx.js:1)
    at t.forEach (LineUpJSx.js:1)
    at Array.forEach (<anonymous>)
    at Ic.update (LineUpJSx.js:1)
    at Object.e.on (LineUpJSx.js:1)
    at S.apply (LineUpJSx.js:1)
    at i (LineUpJSx.js:1)
    at xc.fireImpl (LineUpJSx.js:1)
    at xc.fire (LineUpJSx.js:1)
    at xc.fire (LineUpJSx.js:1)
    at Object.Ac.delayedUpdate.n (LineUpJSx.js:1)
    at setTimeout (LineUpJSx.js:1)

Large number of columns has inconsistent rendering.

  • Release number or git hash: 4.0.0
  • Web browser version and OS: Firefox 91.0.2

Steps to reproduce

  1. Checkout code from hubmapconsortium/portal-ui#2112
  2. Run ./dev-start.sh
  3. Look at http://localhost:5001/lineup/datasets

Observed behavior

This view has a pathologically large number of columns...

uuid	hubmap_id	ablation_distance_between_shots_x_units	ablation_distance_between_shots_x_value	ablation_distance_between_shots_y_units	ablation_distance_between_shots_y_value	ablation_frequency_unit	ablation_frequency_value	acquisition_id	acquisition_instrument_model	acquisition_instrument_vendor	analyte_class	assay_category	assay_type	bulk_atac_cell_isolation_protocols_io_doi	bulk_rna_isolation_protocols_io_doi	bulk_rna_isolation_quality_metric_value	bulk_rna_yield_units_per_tissue_unit	bulk_rna_yield_value	bulk_transposition_input_number_nuclei	cell_barcode_offset	cell_barcode_read	cell_barcode_size	data_collection_mode	data_precision_bytes	description	dna_assay_input_unit	dna_assay_input_value	dual_count_start	end_datetime	execution_datetime	gdna_fragmentation_quality_assurance	increment_z_unit	increment_z_value	is_targeted	is_technical_replicate	labeling	lc_column_model	lc_column_vendor	lc_flow_rate_unit	lc_flow_rate_value	lc_gradient	lc_id_unit	lc_id_value	lc_instrument_model	lth_unitulc_length_value	lc_mobile_phase_a	lc_mobile_phase_b	lc_resin	lc_temp_unit	lc_temp_value	library_adapter_sequence	library_average_fragment_size	library_concentration_unit	library_concentration_value	library_construction_method	library_construction_protocols_io_doi	library_creation_date	library_final_yield	library_final_yield_unit	library_final_yield_value	library_id	library_layout	library_pcr_cycles	library_pcr_cycles_for_sample_index	library_preparation_kit	max_x_width_unit	max_x_width_value	max_y_height_unit	max_y_height_value	ms_scan_mode	ms_source	mz_range_high_value	mz_range_low_value	number_of_antibodies	number_of_barcode_probes	number_of_barcode_regions_per_barcode_probe	number_of_channels	number_of_cycles	number_of_pseudocolors_per_channel	number_of_readout_probes_per_channel	operatoroperator_email	overall_protocols_io_doi	pi	pi_email	polarity	preparation_instrument_model	preparation_instrument_vendor	preparation_maldi_matrix	preparation_type	processing_protocols_io_doi	processing_search	protocols_io_doi	range_z_unit	range_z_value	reagent_prep_protocols_io_doi	resolution_x_unit	resolution_x_value	resolution_y_unitresolution_y_value	resolution_z_unit	resolution_z_value	rnaseq_assay_input	rnaseq_assay_input_unit	rnaseq_assay_input_value	rnaseq_assay_method	roi_description	roi_id	sample_quality_metric	sc_isolation_cell_number	sc_isolation_enrichment	sc_isolation_entity	sc_isolation_protocols_io_doi	sc_isolation_quality_metric	sc_isolation_tissue_dissociation	section_prep_protocols_io_doi	segment_data_format	sequencing_phix_percent	sequencing_read_format	sequencing_read_percent_q30	sequencing_reagent_kit	signal_type	stain	start_datetime	step_z_value	transposition_input	transposition_kit_number	transposition_method	transposition_transposase_source

(Full TSV can be downloaded from https://portal.hubmapconsortium.org/api/v0/datasets.tsv)

About half the time it renders like:
Screen Shot 2021-09-01 at 10 52 25 AM

and half the time it renders like:
Screen Shot 2021-09-01 at 10 55 38 AM

Same approximately 50/50 behavior on Chrome.

Expected behavior

  • Consistently render like the second screenshot.

Compilation error in lineupengine

  • Release number or git hash: v1.0.0-beta.9
  • TS: 2.8.3

Steps to reproduce

  1. Start a new project with create-react-app
  2. Use boilerplate code from README.md to insert a LineUp
  3. Run npm start or npm run build

Observed behavior

Doesn't compile. Observed errors:

/home/moritz/Projects/credit/webapp/node_modules/lineupengine/build/typings/table/internal/ACellAdapter.d.ts
(7,16): error TS2304: Cannot find name 'ACellAdapter'.

/home/moritz/Projects/ts-test/node_modules/lineupengine/build/typings/ARowRenderer.d.ts
(5,10): Module '"/home/moritz/Projects/ts-test/node_modules/lineupengine/build/typings/internal/index"' has no exported member 'IDelayedMode'.

Expected behavior

Compiles

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.