lgsinnovations / react-sigplot Goto Github PK
View Code? Open in Web Editor NEWReact wrapper for SigPlot.js
Home Page: https://sigplot.lgsinnovations.com
License: Apache License 2.0
React wrapper for SigPlot.js
Home Page: https://sigplot.lgsinnovations.com
License: Apache License 2.0
The issue is enzyme.mount is not returning the *Layer object as a React object. Instead, it's returning it as a ReactWrapper object.
Hello Sigplot team,
I am debugging an issue right now where Sigplot is only willing to plot the first 32768 points that I provide it, but then cuts off the remaining points. I am not sure what would be causing this. I have found a few places in the code where the number 32768 is mentioned...
// unless 'All' mode is set or 'xdata' mode is used
// we emulate XPLOT by only showing the first 32768 points
But I do have all mode set, so I am not sure that would be relevant. Also, putting a breaking point there seems to indicate that particular portion of code is not relevant for my situation.
Let me know if ya'll have any thoughts. Appreciate the collaboration as always.
-Kevin
When SigPlot uses HrefLayer with a url based on a React state variable, when the variable is first set, SigPlot loads the given URL. On subsequent changes, an HTTP call to reload the new file is never made.
Add support for plugins on an individual layer -- e.g., highlights. This would look like
<SigPlot>
<ArrayLayer>
<LayerPlugin/>
</ArrayLayer>
</SigPlot>
In the HrefLayer
tests, the following lines fail
● <HrefLayer /> › reloads plot on href prop change
AssertionError: expected [] to have a length of 1 but got 0
...
> 686 | expect(component.instance().plot._Gx.HCB).to.have.lengthOf(1);
● <HrefLayer /> › changes settings on options prop change
AssertionError: expected [] to have a length of 1 but got 0
...
> 717 | expect(component.instance().plot._Gx.lyr).to.have.lengthOf(1);
In src/hreflayer.js and src/websocketlayer.js,
componentDidMount() {
const { href, onload, options } = this.props;
this.plot.deoverlay(); // <----------------
this.layer = this.plot.overlay_href(href, onload, options);
}
componentWillReceiveProps(nextProps) {
const {
href: oldHref,
options: oldOptions,
} = this.props;
const {
href: newHref,
onload: newOnload,
options: newOptions,
} = nextProps;
// we only care if `href` or `options` changes
if (newHref !== oldHref) {
this.plot.deoverlay(); // <----------------
this.plot.overlay_href(newHref, newOnload, newOptions);
} else if (newOptions !== oldOptions) {
this.plot.change_settings(newOptions);
} else {
return;
}
}
src/websocketlayer.js looks roughly the same.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.