@njam-data/components

1.0.1 • Public • Published

@njam-data/components

Reusable svelte components for data projects

Usage

<script>
  import BarChartTable from '@njam-data/components/BarChartTable.svelte'

  const data = [
    {
      "example": "Example 1",
      "A": .5,
      "B": .2,
      "C": .3
    },
    {
      "example": "Example 2",
      "A": .1,
      "B": .3,
      "C": .2
    },
    {
      "example": "Example 3",
      "A": .2,
      "B": .8,
      "C": .1
    }
  ]
</script>

<BarChartTable
  {data}
  width={400}
  height={150}
  yValue={'example'}
  barBackgroundColor={'#efefef'}
  margin={{
    top: 20,
    right: 0,
    bottom: 0,
    left: 65
  }}
/>

Developing

Once you've installed dependencies with npm install (or pnpm install or yarn), start a development server:

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

Building

Before creating a production version of your app, install an adapter for your target environment. Then:

npm run build

You can preview the built app with npm run preview, regardless of whether you installed an adapter. This should not be used to serve your app in production.

Readme

Keywords

none

Package Sidebar

Install

npm i @njam-data/components

Weekly Downloads

0

Version

1.0.1

License

none

Unpacked Size

8.07 kB

Total Files

4

Last publish

Collaborators

  • sethvincent