0.3.7 • Published 3 months ago

dataframe-builder v0.3.7

Weekly downloads
-
License
ISC
Repository
github
Last release
3 months ago

ui-test-dataframe-builder

This library builds dataframes that can be used to help build UI components. Suitable to create data for:

  • charts
  • tables
  • UIs

Features

  • ability to specify column types

Usage

const sampleColTypes = [
 { name: "column1", type: "string", subType: "name" },
 { name: "column2", type: "number", min: 0, max: 100, precision: 2 },
 { name: "columnA", type: "boolean" },
 { name: "columnB", type: "integer", min: 0, max: 100 }, // New column for integers
];

console.log("testData", testData);

Result:

testData [
  {
    column1: 'Amelia Lewis',
    column2: 52.6683,
    columnA: true,
    columnB: 52
  },
  {
    column1: 'Jane Clarke',
    column2: 1.24444,
    columnA: false,
    columnB: 53
  },
  {
    column1: 'Mohammed Khan',
    column2: 5.84364,
    columnA: true,
    columnB: 60
  },
  {
    column1: 'Ava Garden',
    column2: 51.95044,
    columnA: true,
    columnB: 47
  },
  {
    column1: 'Jacob Jackson',
    column2: 30.15283,
    columnA: true,
    columnB: 52
  }
]

Screenshot of sample usage

Alt text

0.3.6

3 months ago

0.3.5

3 months ago

0.3.7

3 months ago

0.3.2

3 months ago

0.3.1

3 months ago

0.3.4

3 months ago

0.3.3

3 months ago

0.3.0

3 months ago

0.2.1

3 months ago

0.2.0

3 months ago

0.2.2

3 months ago

0.1.2

3 months ago