
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
chartjs-plugin-deferred
Advanced tools
Chart.js plugin to defer initial chart updates until the user scrolls and the canvas appears inside the viewport, and thus trigger the initial chart animations when the user is likely to see them.
Requires Chart.js 3.x.
new Chart(ctx, {
// ... data ...
options: {
// ... other options ...
plugins: {
deferred: {
xOffset: 150, // defer until 150px of the canvas width are inside the viewport
yOffset: '50%', // defer until 50% of the canvas height are inside the viewport
delay: 500 // delay of 500 ms after the canvas is considered inside the viewport
}
}
}
});
You first need to install node dependencies (requires Node.js):
> npm install
The following commands will then be available from the repository root:
> npm run build // build dist files
> npm run build:dev // build and watch for changes
> npm run lint // perform code linting
> npm run lint -- --fix // automatically fix linting problems
> npm run docs // generate documentation (`dist/docs`)
> npm run docs:dev // generate documentation and watch for changes
> npm run package // create tgz and zip archives with dist files
chartjs-plugin-deferred
is available under the MIT license.
FAQs
Chart.js plugin to defer initial chart updates
The npm package chartjs-plugin-deferred receives a total of 3,478 weekly downloads. As such, chartjs-plugin-deferred popularity was classified as popular.
We found that chartjs-plugin-deferred demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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 uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.