
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
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', 'ja', '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
"showShare": 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": [ ],
/* optional field timezoneOffset in minutes, see (http://api.highcharts.com/highstock/global.timezoneOffset)
timezone is global in highcharts, this option will effect other charts on the page */
"timezoneOffset": 0,
});
// 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
node build.js
to get dictionary.json
file./src/i18/{lang}.json
files.dictionary.json
file.FAQs
webtrader charts
The npm package webtrader-charts receives a total of 10 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.