How to use the baseui/data-table.NUMERICAL_FORMATS.ACCOUNTING function in baseui

To help you get started, we’ve selected a few baseui 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 uber / baseweb / documentation-site / examples / data-table / basic.js View on Github external
StringColumn({
    title: 'string',
    mapDataToValue: (data: RowDataT) => data[1],
  }),
  NumericalColumn({
    title: 'three',
    mapDataToValue: (data: RowDataT) => data[2],
  }),
  NumericalColumn({
    title: 'neg std',
    highlight: n => n < 0,
    mapDataToValue: (data: RowDataT) => data[3],
  }),
  NumericalColumn({
    title: 'accounting',
    format: NUMERICAL_FORMATS.ACCOUNTING,
    mapDataToValue: (data: RowDataT) => data[4],
  }),
  CustomColumn<{color: string}, {}>({
    title: 'custom color',
    mapDataToValue: (data: RowDataT) => data[5],
    renderCell: function Cell(props) {
      const [css] = useStyletron();
      return (
        <div>
          </div>
github uber / baseweb / documentation-site / examples / data-table / basic.tsx View on Github external
StringColumn({
    title: 'string',
    mapDataToValue: (data: RowDataT) =&gt; data[1],
  }),
  NumericalColumn({
    title: 'three',
    mapDataToValue: (data: RowDataT) =&gt; data[2],
  }),
  NumericalColumn({
    title: 'neg std',
    highlight: (n: number) =&gt; n &lt; 0,
    mapDataToValue: (data: RowDataT) =&gt; data[3],
  }),
  NumericalColumn({
    title: 'accounting',
    format: NUMERICAL_FORMATS.ACCOUNTING,
    mapDataToValue: (data: RowDataT) =&gt; data[4],
  }),
  CustomColumn&lt;{color: string}, {}&gt;({
    title: 'custom color',
    mapDataToValue: (data: RowDataT) =&gt; data[5],
    renderCell: function Cell(props: any) {
      const [css] = useStyletron();
      return (
        <div>
          </div>
github uber / baseweb / documentation-site / examples / data-table / batch-action.tsx View on Github external
BooleanColumn({
    title: 'is it good?',
    mapDataToValue: (data: RowDataT) => data[1],
  }),
  CategoricalColumn({
    title: 'Genre',
    mapDataToValue: (data: RowDataT) => data[2],
  }),
  NumericalColumn({
    title: 'Production Budget (millions)',
    format: NUMERICAL_FORMATS.ACCOUNTING,
    mapDataToValue: (data: RowDataT) => data[3],
  }),
  NumericalColumn({
    title: 'Box Office (millions)',
    format: NUMERICAL_FORMATS.ACCOUNTING,
    mapDataToValue: (data: RowDataT) => data[4],
  }),
  NumericalColumn({
    title: 'ROI',
    precision: 2,
    mapDataToValue: (data: RowDataT) => data[5],
  }),
  NumericalColumn({
    title: 'Rating IMDB',
    precision: 2,
    mapDataToValue: (data: RowDataT) => data[6],
  }),
];

const initialRows = [
  ['Avatar', false, 'Action', 237, 2784, 11.7, 8.0],
github uber / baseweb / documentation-site / examples / data-table / row-height-line-clamp.tsx View on Github external
maxWidth: 300,
    lineClamp: 3,
    mapDataToValue: (data: RowDataT) => data.loremIpsum,
  }),
  CategoricalColumn({
    title: 'Genre',
    mapDataToValue: (data: RowDataT) => data.genre,
  }),
  NumericalColumn({
    title: 'Production Budget (millions)',
    format: NUMERICAL_FORMATS.ACCOUNTING,
    mapDataToValue: (data: RowDataT) => data.budget,
  }),
  NumericalColumn({
    title: 'Box Office (millions)',
    format: NUMERICAL_FORMATS.ACCOUNTING,
    mapDataToValue: (data: RowDataT) => data.boxOffice,
  }),

  NumericalColumn({
    title: 'ROI',
    precision: 2,
    mapDataToValue: (data: RowDataT) => data.roi,
  }),
  NumericalColumn({
    title: 'Rating IMDB',
    precision: 2,
    mapDataToValue: (data: RowDataT) => data.imdb,
  }),
];

const rows = [
github uber / baseweb / documentation-site / examples / data-table / batch-action.js View on Github external
BooleanColumn({
    title: 'is it good?',
    mapDataToValue: (data: RowDataT) => data[1],
  }),
  CategoricalColumn({
    title: 'Genre',
    mapDataToValue: (data: RowDataT) => data[2],
  }),
  NumericalColumn({
    title: 'Production Budget (millions)',
    format: NUMERICAL_FORMATS.ACCOUNTING,
    mapDataToValue: (data: RowDataT) => data[3],
  }),
  NumericalColumn({
    title: 'Box Office (millions)',
    format: NUMERICAL_FORMATS.ACCOUNTING,
    mapDataToValue: (data: RowDataT) => data[4],
  }),
  NumericalColumn({
    title: 'ROI',
    precision: 2,
    mapDataToValue: (data: RowDataT) => data[5],
  }),
  NumericalColumn({
    title: 'Rating IMDB',
    precision: 2,
    mapDataToValue: (data: RowDataT) => data[6],
  }),
];

const initialRows = [
  ['Avatar', false, 'Action', 237, 2784, 11.7, 8.0],
github uber / baseweb / documentation-site / examples / data-table / row-height-line-clamp.js View on Github external
title: 'Movie Title',
    mapDataToValue: (data: RowDataT) => data.title,
  }),
  StringColumn({
    title: 'Lorem Ipsum Description',
    maxWidth: 300,
    lineClamp: 3,
    mapDataToValue: (data: RowDataT) => data.loremIpsum,
  }),
  CategoricalColumn({
    title: 'Genre',
    mapDataToValue: (data: RowDataT) => data.genre,
  }),
  NumericalColumn({
    title: 'Production Budget (millions)',
    format: NUMERICAL_FORMATS.ACCOUNTING,
    mapDataToValue: (data: RowDataT) => data.budget,
  }),
  NumericalColumn({
    title: 'Box Office (millions)',
    format: NUMERICAL_FORMATS.ACCOUNTING,
    mapDataToValue: (data: RowDataT) => data.boxOffice,
  }),

  NumericalColumn({
    title: 'ROI',
    precision: 2,
    mapDataToValue: (data: RowDataT) => data.roi,
  }),
  NumericalColumn({
    title: 'Rating IMDB',
    precision: 2,
github uber / baseweb / documentation-site / examples / data-table / row-height-line-clamp.tsx View on Github external
title: 'Movie Title',
    mapDataToValue: (data: RowDataT) => data.title,
  }),
  StringColumn({
    title: 'Lorem Ipsum Description',
    maxWidth: 300,
    lineClamp: 3,
    mapDataToValue: (data: RowDataT) => data.loremIpsum,
  }),
  CategoricalColumn({
    title: 'Genre',
    mapDataToValue: (data: RowDataT) => data.genre,
  }),
  NumericalColumn({
    title: 'Production Budget (millions)',
    format: NUMERICAL_FORMATS.ACCOUNTING,
    mapDataToValue: (data: RowDataT) => data.budget,
  }),
  NumericalColumn({
    title: 'Box Office (millions)',
    format: NUMERICAL_FORMATS.ACCOUNTING,
    mapDataToValue: (data: RowDataT) => data.boxOffice,
  }),

  NumericalColumn({
    title: 'ROI',
    precision: 2,
    mapDataToValue: (data: RowDataT) => data.roi,
  }),
  NumericalColumn({
    title: 'Rating IMDB',
    precision: 2,
github uber / baseweb / documentation-site / examples / data-table / batch-action.js View on Github external
const columns = [
  StringColumn({
    title: 'Movie',
    mapDataToValue: (data: RowDataT) => data[0],
  }),
  BooleanColumn({
    title: 'is it good?',
    mapDataToValue: (data: RowDataT) => data[1],
  }),
  CategoricalColumn({
    title: 'Genre',
    mapDataToValue: (data: RowDataT) => data[2],
  }),
  NumericalColumn({
    title: 'Production Budget (millions)',
    format: NUMERICAL_FORMATS.ACCOUNTING,
    mapDataToValue: (data: RowDataT) => data[3],
  }),
  NumericalColumn({
    title: 'Box Office (millions)',
    format: NUMERICAL_FORMATS.ACCOUNTING,
    mapDataToValue: (data: RowDataT) => data[4],
  }),
  NumericalColumn({
    title: 'ROI',
    precision: 2,
    mapDataToValue: (data: RowDataT) => data[5],
  }),
  NumericalColumn({
    title: 'Rating IMDB',
    precision: 2,
    mapDataToValue: (data: RowDataT) => data[6],
github uber / baseweb / documentation-site / examples / data-table / row-height-line-clamp.js View on Github external
maxWidth: 300,
    lineClamp: 3,
    mapDataToValue: (data: RowDataT) => data.loremIpsum,
  }),
  CategoricalColumn({
    title: 'Genre',
    mapDataToValue: (data: RowDataT) => data.genre,
  }),
  NumericalColumn({
    title: 'Production Budget (millions)',
    format: NUMERICAL_FORMATS.ACCOUNTING,
    mapDataToValue: (data: RowDataT) => data.budget,
  }),
  NumericalColumn({
    title: 'Box Office (millions)',
    format: NUMERICAL_FORMATS.ACCOUNTING,
    mapDataToValue: (data: RowDataT) => data.boxOffice,
  }),

  NumericalColumn({
    title: 'ROI',
    precision: 2,
    mapDataToValue: (data: RowDataT) => data.roi,
  }),
  NumericalColumn({
    title: 'Rating IMDB',
    precision: 2,
    mapDataToValue: (data: RowDataT) => data.imdb,
  }),
];

const rows = [
github uber / baseweb / documentation-site / examples / data-table / batch-action.tsx View on Github external
const columns = [
  StringColumn({
    title: 'Movie',
    mapDataToValue: (data: RowDataT) => data[0],
  }),
  BooleanColumn({
    title: 'is it good?',
    mapDataToValue: (data: RowDataT) => data[1],
  }),
  CategoricalColumn({
    title: 'Genre',
    mapDataToValue: (data: RowDataT) => data[2],
  }),
  NumericalColumn({
    title: 'Production Budget (millions)',
    format: NUMERICAL_FORMATS.ACCOUNTING,
    mapDataToValue: (data: RowDataT) => data[3],
  }),
  NumericalColumn({
    title: 'Box Office (millions)',
    format: NUMERICAL_FORMATS.ACCOUNTING,
    mapDataToValue: (data: RowDataT) => data[4],
  }),
  NumericalColumn({
    title: 'ROI',
    precision: 2,
    mapDataToValue: (data: RowDataT) => data[5],
  }),
  NumericalColumn({
    title: 'Rating IMDB',
    precision: 2,
    mapDataToValue: (data: RowDataT) => data[6],