Skip to content

Repository files navigation

react-sigplot

LicenseBuild StatusPRs Welcomenpm versioncodecov

SigPlot wrapper component for ReactJS.

Source: https://lgsinnovations.gitlab.com/axios/react-sigplot

Install: npm install --save react-sigplot

What is it?

Provides a component that wraps the SigPlot library.

Properties

<SigPlot />

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

<ArrayLayer />

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

<PipeLayer />

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

<HrefLayer />

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

<WebsocketLayer />

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

Usage

Basic

/** Default plot an array three different ways * 1. As a standard array * 2. As a pipe * 3. As a file/url */<div><SigPlotoptions={{autol:1}}><ArrayLayerdata={this.state.rasterData}/></SigPlot><SigPlot><PipeLayeroptions={{type: 2000,subsize: 1000}}data={this.state.rasterData}/></SigPlot><SigPlot><HrefLayerhref={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

Releases

Packages

Used by

Contributors

Languages