
Security News
npm ‘is’ Package Hijacked in Expanding Supply Chain Attack
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
vue-funnel-graph-js
Advanced tools
Funnel graph drawing library for Vue.js.
This is the Vue.js version of FunnelGraph.js, learn more about the library and see documentation here.
npm i vue-funnel-graph-js
After installing, import the VueFunnelGraph
component:
import { VueFunnelGraph } from 'vue-funnel-graph-js';
You can now use the custom element:
<vue-funnel-graph :width="width" :height="height" :labels="labels"
:values="values" :colors="colors" :subLabels="subLabels" :direction="direction"
:gradient-direction="gradientDirection"
:animated="true" :display-percentage="true"
></vue-funnel-graph>
The values are passed to props:
export default {
name: 'app',
components: {
VueFunnelGraph
},
data() {
return {
labels: ['Impressions', 'Add To Cart', 'Buy'],
subLabels: ['Direct', 'Social Media', 'Ads'],
values: [
[3000, 2500, 6500],
[3000, 1700, 1000],
[600, 200, 130]
],
colors: [
['#FFB178', '#FF78B1', '#FF3C8E'],
['#A0BBFF', '#EC77FF'],
['#A0F9FF', '#7795FF']
],
direction: 'horizontal',
gradientDirection: 'horizontal',
height: 300,
width: 800
};
}
}
Option | Description | Type | Required | Options | Default | Example |
---|---|---|---|---|---|---|
width | Width of the funnel graph | number | Yes | 0 | 800 | |
height | Height of the funnel graph | number | Yes | 0 | 300 | |
labels | Title of each data part | array | Yes | ['Impressions', 'Add To Cart', 'Buy'] | ||
values | Numbers that the funnel chart visualizes | array | Yes | [12000, 4700, 930] | ||
colors | Colors of the graph. If a string or array with one element passed it fills the graph with a solid color, if the array contains more than one element it fill the graph with a gradient. For two-dimensional charts and array of arrays shall be passed to fill each segment with a separate gradient. The array can contain arrays and strings mixed. If a there are more segments than colors provided, up to 10 extra segments will be filled with pre-defined solid colors | array⎮string | Yes | [12000, 4700, 930] | ||
subLabels (:subLabels) | Title of each data segment | array | Yes for two-dimensional graphs | ['Direct', 'Social Media', 'Ads'] | ||
direction | Whether the chart visualization is displayed vertically or horizontally | string | No | 'vertical', 'horizontal' | 'horizontal' | |
gradientDirection (:gradient-direction) | Whether the gradient applied to the segments of the graph is displayed from top to bottom or from left to right | string | No | 'vertical', 'horizontal' | 'horizontal' | |
animated | Whether any change in graph shape will be displayed with a smooth transition | boolean | No | true , false | true | false |
displayPercentage (:display-percentage) | Whether to display the automatically calculated percentage values below the labels | boolean | No | true , false | true |
0.1.2 (Mar 7, 2019)
FAQs
   [![Gitter](https
The npm package vue-funnel-graph-js receives a total of 202 weekly downloads. As such, vue-funnel-graph-js popularity was classified as not popular.
We found that vue-funnel-graph-js 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
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Security News
A critical flaw in the popular npm form-data package could allow HTTP parameter pollution, affecting millions of projects until patched versions are adopted.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.