Gathering detailed insights and metrics for chartjs-plugin-funnel-labels
Gathering detailed insights and metrics for chartjs-plugin-funnel-labels
Gathering detailed insights and metrics for chartjs-plugin-funnel-labels
Gathering detailed insights and metrics for chartjs-plugin-funnel-labels
Plugin for Chart.js to add labels between columns to show the % progress in the same dataset
npm install chartjs-plugin-funnel-labels
Typescript
Module System
Node Version
NPM Version
70.3
Supply Chain
98.8
Quality
75.4
Maintenance
100
Vulnerability
100
License
JavaScript (78.36%)
HTML (21.64%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Unlicense License
6 Stars
28 Commits
4 Forks
1 Watchers
1 Branches
1 Contributors
Updated on Oct 03, 2024
Latest Version
1.0.4
Package Id
chartjs-plugin-funnel-labels@1.0.4
Unpacked Size
11.90 kB
Size
4.01 kB
File Count
5
NPM Version
3.10.6
Node Version
0.10.25
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
No dependencies detected.
Plugin for Chart.js to add labels between columns to show the % progress in the same dataset. Chart.js 2.6.0 or above required.
Written by Albert Gonzalez and released under the Unlicense.
Some improvements (border color, border gradient color and label text) thanks to Pawel M.
Add the chartjs-plugin-funnel-label.js and use the funnel_labels options to enable the plugin and override the default values.
It works only in bar charts with one dataset and will show the % difference between each bar.
1new Chart($("#chart"), {
2 type: 'bar',
3 data: {
4 labels: ["Alpha Value", "Beta Value", "Charlie Value", "Delta Value"],
5 datasets: [{
6 label: 'First Dataset',
7 data: [555, 302, 175, 50],
8 backgroundColor: "rgba(75, 192, 192, 1)"
9 }]
10 },
11 options: {
12 scales: {
13 yAxes: [{
14 ticks: {
15 beginAtZero: true
16 }
17 }],
18 xAxes: [{
19 barPercentage: 0.3
20 }]
21 },
22 funnel_labels: {
23 enabled: true,
24 background_color: "red"
25 }
26 }
27});
They're set in the label_options object with these default values:
1label_options: { 2 enabled: false, 3 font_style: "normal", 4 font_family: "Arial", 5 font_color: "white", 6 background_color: "#FFBA4B", 7 rectangle_width_scale_factor: 5, 8 show_zeros: true, 9 min_width_upper_label: 150, 10 allow_upper_label: true, 11 force_upper_label: false, 12 border_color: "#FFBA4B", 13 border_colors: [], 14 sub_text: null, 15 sub_text_style: "normal", 16 text_align: "center", 17 label_centered: true 18}
width for each label rectangle = width between two bars / rectangle_width_scale_factor
If true will show the labels with a 0% value (otherwise will hide them).
If the width between two bars is smaller than this value the labels will appear over them.
If set to false, the labels over the bars won't appear (it won't draw anything).
If true will always show the labels over the bars (this will override the allow_upper_label option).
Single color for the borders.
An array of colors to create a gradient between them.
Optional label text
Style for the text
Alignment for the text
If true will center the label on the bar (vertically).
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 1/25 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More