Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
chartjs-plugin-scroll-bar
Advanced tools
This plugin for Chart.js that make scrollable charts in descriptors. Requires Chart.js v3.9.1 or higher.
npm install chartjs-plugin-scroll-bar
import { Chart } from 'chartjs';
import ChartjsPluginScrollBar from 'chartjs-plugin-scroll-bar';
Chart.register(ChartjsPluginScrollBar);
Name | Type | Default | Description |
---|---|---|---|
enable | boolean | undefined | |
scrollType | 'Horizontal' | 'Vertical' | undefined | depend on chart option indexAxis so x -> horizontal y-> vertical. |
specify plugin options with scrollBar: {enable: true, scrollType: 'Horizontal'}
.
you must use indexAxis and min max of scales for working scrollbar.
scroll size should be the difference between min and max of descriptor scale + 1.
new Chart(document.getElementById("my-chart"), {
type: "bar",
data: {
labels: ["Foo", "Bar", "flare"],
datasets: [
{ label: "bad", data: [5, 25], backgroundColor: "rgba(244, 143, 177, 0.6)" },
{ label: "better", data: [15, 10], backgroundColor: "rgba(255, 235, 59, 0.6)" },
{ label: "good", data: [10, 8], backgroundColor: "rgba(100, 181, 246, 0.6)" },
],
},
options: {
indexAxis: "x",
scales: {
x: {
min: 0,
max: 1,
}
}
plugins: {
scrollBar: {enable: true, scrollType: 'Horizontal'},
},
},
});
Pull requests and issues are always welcome.
For bugs and feature requests, please create an issue.
git checkout -b feature_name
git commit -am 'Add some feature'
git push origin feature_name
npm install
npm version (major|minor|patch) && npm run build:publish
FAQs
scrollbar data in chart js
We found that chartjs-plugin-scroll-bar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.