
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
react-jsx-highstock
Advanced tools
Highcharts (including Highstock) charts built using React components
This package exposes everything from react-jsx-highcharts
, but additionally provides components for building Highstock charts.
N.B. You can build both Highcharts and Highstock charts from this package.
As of 1.2.0 React JSX Highstock supports using Immutable.js data structures as Series data.
As of 2.x you are required to use the withHighcharts
HOC to inject the Highcharts object (see below)
React JSX Highstock now requires the withHighcharts
higher order component to render your chart components. This HOC allows you to inject the Highcharts object the library will interact with.
This means we can use Highcharts in styled mode (style by CSS) - see example, or perform customisations to the Highcharts object before using it.
Furthermore this approach allows us to simplify the peer-dependencies, so React JSX Highstock now has a peer-dependency of highcharts
, rather than highstock-release
Using 1.x your code would have looked something like
import { HighchartsStockChart, Chart, /* etc... */ } from 'react-jsx-highstock';
import Highcharts from 'highstock-release';
const MyChart = () => (
<HighchartsStockChart>
<Chart />
// etc
</HighchartsStockChart>
);
export default MyChart
But with 2.x you need to
highcharts
(note the Highcharts import)withHighcharts
, when exporting the component (note the last line)import { withHighcharts, HighchartsStockChart, Chart, /* etc... */ } from 'react-jsx-highstock';
import Highcharts from 'highcharts/highstock';
const MyChart = () => (
<HighchartsStockChart>
<Chart />
// etc
</HighchartsStockChart>
);
export default withHighcharts(MyChart, Highcharts); // Injecting the Highstock object
render () {
return (
<HighchartsStockChart>
<Chart onClick={this.handleClick} zoomType="x" />
<Title>Highstocks Example</Title>
<Legend>
<Legend.Title>Key</Legend.Title>
</Legend>
<RangeSelector>
<RangeSelector.Button count={1} type="day">1d</RangeSelector.Button>
<RangeSelector.Button count={7} type="day">7d</RangeSelector.Button>
<RangeSelector.Button count={1} type="month">1m</RangeSelector.Button>
<RangeSelector.Button type="all">All</RangeSelector.Button>
<RangeSelector.Input boxBorderColor="#7cb5ec" />
</RangeSelector>
<Tooltip />
<XAxis>
<XAxis.Title>Time</XAxis.Title>
</XAxis>
<YAxis id="price">
<YAxis.Title>Price</YAxis.Title>
<AreaSplineSeries id="profit" name="Profit" data={data1} />
</YAxis>
<YAxis id="social" opposite>
<YAxis.Title>Social Buzz</YAxis.Title>
<SplineSeries id="twitter" name="Twitter mentions" data={data2} />
</YAxis>
<Navigator>
<Navigator.Series seriesId="profit" />
<Navigator.Series seriesId="twitter" />
</Navigator>
</HighchartsStockChart>
);
}
// Provide Highcharts object for library to interact with
export default withHighcharts(MyComponent, Highcharts);
FAQs
Highcharts (including Highstock) charts built using React components
The npm package react-jsx-highstock receives a total of 2,009 weekly downloads. As such, react-jsx-highstock popularity was classified as popular.
We found that react-jsx-highstock demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.