
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
webtrader-charts
Advanced tools
The charting library extracted from Webtrader. See Demo
Use npm / yarn
npm install --save webtrader-charts
yarn add webtrader-charts
You need to provide these dependences jquery
, moment
and highstock#5.0.x
.
Take a look at webpack.config.js -> externals
.
import wtcharts from 'webtrader-charts';
// init must be called before anything else.
wtcharts.init({
appId: 11,
lang: 'en',
server: 'wss://ws.binaryws.com/websockets/v3'
});
// supported langauges are [ 'ar', 'en', 'de', 'es', 'fr', 'id', 'it', 'pl', 'pt', 'ru', 'th', 'vi', 'zh_cn', 'zh_tw']
const chart = wtcharts.chartWindow.addNewChart($parent, {
"type": "line",
"timePeriod": "1m",
"instrumentCode": "RDBULL",
"instrumentName": "Bull Market Index",
"showInstrumentName": true, // default is false
"showOverlays": false, // default is true
"indicators": [
{
"id": "cks",
"name": "Chande Kroll Stop",
"options": {
"period": 10,
"maxMinPeriod": 20,
"multiplier": 3,
"longStopStroke": "#00C176",
"shortStopStroke": "#FF003C",
"strokeWidth": 1,
"dashStyle": "Solid"
}
},
],
"overlays": [ ],
});
// Will be called every time user makes a change
chart.events.anyChange = () => {
console.warn(chart.data());
// Pass chart.data() to addNewChart() to restore a chart.
};
chart.actions.reflow(); // Resizes the chart, call it when container is resized.
chart.actions.refresh(); // Refreshes the entire chart.
chart.actions.destroy(); // Destroys the chart. returns a promise.
webpack.config.js
to write the output into /example
folder.yarn install
on both main project and /example
folder.yarn watch
on main project.yarn watch
on /example
folder.localhost:8080
FAQs
webtrader charts
The npm package webtrader-charts receives a total of 2 weekly downloads. As such, webtrader-charts popularity was classified as not popular.
We found that webtrader-charts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.