Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
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
The npm package chartjs-plugin-scroll-bar receives a total of 60 weekly downloads. As such, chartjs-plugin-scroll-bar popularity was classified as not popular.
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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.