@h5web/lib
TypeScript icon, indicating that this package has built-in type declarations

13.0.0 • Public • Published

H5Web Visualization Components

Docs Version

H5Web is a collection of React components to visualize and explore data. It consists of two main packages:

While used in @h5web/app with HDF5 files, @h5web/lib visualization components are not tied to HDF5 and can be used to visualize data from any source.

For more information, visit the Storybook documentation site.

Prerequisites

The react and react-dom dependencies must be installed in your project. Note that as of version 10, @h5web/lib requires React 18.

This package supports TypeScript out of the box without the need to install a separate @types/ package.

Getting started 🚀

npm install @h5web/lib three @react-three/fiber ndarray
import '@h5web/lib/dist/styles.css';

import React from 'react';
import ndarray from 'ndarray';
import { HeatmapVis, getDomain } from '@h5web/lib';

// Initialise source 2D array
const values = [
  [0, 1, 2],
  [3, 4, 5],
];

// Flatten source array
const flatValues: number[] = values.flat(Infinity);

// Convert to ndarray and get domain
const dataArray = ndarray(flatValues, [2, 3]);
const domain = getDomain(dataArray);

function MyApp() {
  return (
    <div style={{ display: 'flex', height: '30rem' }}>
      <HeatmapVis dataArray={dataArray} domain={domain} />
    </div>
  );
}

export default MyApp;

If your bundler supports it (e.g. webpack 5), you may be able to shorten the stylesheet import path as follows:

import '@h5web/lib/styles.css';

Examples

The following code sandboxes demonstrate how to set up and use @h5web/lib with various front-end development stacks:

Browser support

H5Web works out of the box on Firefox 78 ESR. Support for Firefox 68 ESR is possible by polyfilling the ResizeObserver API. Older versions of Firefox are not supported.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
13.0.0392latest
13.0.0-beta.03next

Version History

VersionDownloads (Last 7 Days)Published
13.0.0392
13.0.0-beta.03
12.0.11,423
12.0.05
12.0.0-beta.13
12.0.0-beta.03
11.2.010
11.2.0-beta.23
11.2.0-beta.13
11.2.0-beta.03
11.1.118
11.1.1-beta.03
11.1.04
11.1.0-beta.04
11.0.08
10.2.0-beta.43
10.2.0-beta.33
10.2.0-beta.23
10.2.0-beta.13
10.2.0-beta.03
10.1.0
0
10.1.0-beta.1
0
10.1.0-beta.0
0
10.0.01
10.0.0-beta.00
9.0.00
9.0.0-beta.30
9.0.0-beta.20
9.0.0-beta.10
9.0.0-beta.00
8.0.1-beta.20
8.0.1-beta.10
8.0.1-beta.00
8.0.080
7.2.0-beta.00
7.1.1-beta.20
7.1.1-beta.10
7.1.1-beta.00
7.1.01
7.1.0-beta.00
7.0.2-beta.20
7.0.2-beta.060
7.0.10
7.0.1-beta.00
7.0.00
7.0.0-beta.70
7.0.0-beta.60
7.0.0-beta.50
7.0.0-beta.40
7.0.0-beta.30
7.0.0-beta.20
7.0.0-beta.10
7.0.0-beta.00
6.6.10
6.6.00
6.6.0-beta.11
6.6.0-beta.00
6.5.02
6.5.0-beta.10
6.5.0-beta.00
6.4.2-beta.10
6.4.2-beta.00
6.4.11
6.4.1-beta.00
6.4.02
6.3.00
6.2.2-beta.10
6.2.2-beta.00
6.2.10
6.2.03
6.1.00
6.0.10
6.0.00
6.0.0-beta.30
6.0.0-beta.20
6.0.0-beta.10
5.0.10
6.0.0-beta.00
5.0.03
5.0.0-beta.10
4.2.0-beta.40
4.2.0-beta.30
4.2.0-beta.20
4.2.0-beta.10
4.2.0-beta.00
4.1.00
4.1.0-beta.20
4.1.0-beta.10
4.1.0-beta.00
4.0.00
4.0.0-beta.10
4.0.0-beta.00
3.0.3-beta.00
3.0.2-beta.10
3.0.2-beta.00
3.0.20
3.0.10
3.0.1-beta.00
3.0.0-beta.00
2.0.0-beta.11
2.0.00
1.5.00
1.4.10
1.4.1-beta.50
1.4.0-beta.50
1.4.1-beta.40
1.4.1-beta.30
1.4.1-beta.20
1.4.1-beta.10
1.4.1-beta.00
1.4.00
1.4.0-beta.00
1.3.00
1.2.00
1.1.1-beta.00
1.1.00
1.1.0-beta.00
1.0.00
0.1.0-beta.80
0.1.0-beta.70
0.1.0-beta.60
0.1.0-beta.50
0.1.0-beta.40
0.1.0-beta.30
0.1.0-beta.20
0.1.0-beta.10
0.1.0-beta.00
0.0.290
0.0.280
0.0.270
0.0.260
0.0.250
0.0.240
0.0.230
0.0.220
0.0.210
0.0.200
0.0.190
0.0.180
0.0.170
0.0.150
0.0.140
0.0.130
0.0.120
0.0.110
0.0.100
0.0.90
0.0.80
0.0.70
0.0.60
0.0.50
0.0.40
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i @h5web/lib

Weekly Downloads

2,055

Version

13.0.0

License

MIT

Unpacked Size

1.15 MB

Total Files

9

Last publish

Collaborators

  • axelboc