LGSInnovations / react-sigplot

React wrapper for SigPlot.js
https://sigplot.lgsinnovations.com
Apache License 2.0
4 stars 10 forks source link

Add bluelayer #11

Closed desean1625 closed 5 years ago

desean1625 commented 5 years ago

Allows for loading a bluefile directly

var hcb = sigplot.m.initialize([170, 85, 170, 85, 170, 85, 170, 85], {
  format: "SP"
});
class App extends React.Component {
  constructor() {
    super();
  }

  render() {
    return (
      <div style={{ height: "50vw", width: "50vw" }}>
        <SigPlot ref={"plot"}>
          <BlueLayer
            data={hcb}
            layerOptions={{
              subsize: 8,
              layerType: "2D"
          }}
          />
        </SigPlot>
      </div>
    );
  }
}

const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);
mrecachinas commented 5 years ago

Thanks @desean1625