0.1.16 • Published 3 years ago

react-sigplot v0.1.16

Weekly downloads
270
License
Apache-2.0
Repository
github
Last release
3 years ago

react-sigplot

License Build Status PRs Welcome npm version codecov

SigPlot wrapper component for ReactJS.

Install: npm install --save react-sigplot

What is it?

Provides a component that wraps the SigPlot library.

Properties

\

PropertyTypeDefaultExplanation
heightnumber300Height of the div wrapping SigPlot
widthnumber300Width of the div wrapping SigPlot
displaystringinline-blockCSS display type for div wrapping SigPlot
stylesobjectundefinedany other CSS Styles as JS object
optionsobject{all: true, expand: true, autol: 100, autohide_panbars: true}SigPlot Plot options

\

PropertyTypeDefaultExplanation
dataarray(number)undefinedArray of values to plot
optionsobjectundefinedSigPlot data header
layerOptionsobjectundefinedSigPlot Layer options

\

PropertyTypeDefaultExplanation
dataarray(number)undefinedArray of values to plot
optionsobjectundefinedSigPlot Layer options

\

PropertyTypeDefaultExplanation
hrefstring''URL or path to a bluefile or MATLAB file
onloadfunctionnullFunction that will get executed when file is loaded
optionsobjectundefinedSigPlot Layer options

\

PropertyTypeDefaultExplanation
wsurlstring''URL to the websocket server
overridesobjectundefinedSigPlot Layer overrides
optionsobjectundefinedSigPlot Layer options

\

PropertyTypeDefaultExplanation
wsurlstring''URL to the websocket server
overridesobjectundefinedSigPlot Layer overrides
optionsobjectundefinedSigPlot Layer options
fpsnumberundefinedFrames per second for WPIPE

Usage

Basic

/** Default plot an array three different ways
 * 1. As a standard array
 * 2. As a pipe
 * 3. As a file/url
 */
<div>
  <SigPlot options={{autol:1}}>
    <ArrayLayer data={this.state.rasterData}/>
  </SigPlot>
  <SigPlot>
    <PipeLayer options={{type: 2000, subsize: 1000}}
      data={this.state.rasterData}/>
  </SigPlot>
  <SigPlot>
    <HrefLayer
      href={this.state.href}/>
  </SigPlot>
</div>

Example Preview

If you run

$ npm run build
$ python -m SimpleHTTPServer 8888

and in a browser, navigate to http://0.0.0.0:8888, you should see the following

React Sigplot

0.1.16

3 years ago

0.1.15

3 years ago

0.1.13

4 years ago

0.1.10

4 years ago

0.1.11

4 years ago

0.1.9

4 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.2

6 years ago