
Product
Socket Firewall Now Blocks Malicious VS Code and Open VSX Extensions
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.
vue-pie-chart
Advanced tools
<pie-chart :percent=80 label-small="a.b.c" />

Demo.
2.9 kB gziped, no external dependencies.
npm i vue-pie-chart
Register component:
const PieChart = require('vue-pie-chart')
// or import .vue-file, if you have vue-loader
import PieChart from 'vue-pie-chart/src/PieChart.vue'
// register globally
Vue.component('pie-chart', PieChart)
// or register in your Vue instance
new Vue({
components: {
'pie-chart': PieChart
}
})
Then use it in template, here shown with default attributes:
<pie-chart
:ratio=0.42
:percent=42
:stroke-width=1
label="42 %"
label-small=""
color=#40a070
:opacity=0.7
/>
ratio: numberSize of pie chart. 1 is a cirle, 0.5 is a half circle. Pie will rotate clock-wise if positive, and counter-clock-wise if negative. Wraps when absolute value is above 1.
percent: numberSize of pie chart. 100 is a cirle, 50 is a half circle. Pie will rotate clock-wise if positive, and counter-clock-wise if negative. Wraps when absolute value is above 100. If both percent and ratio is given, ratio is used.
stroke-width: numberSize of bar. Should be above 0 and below 10. 10 will completely fill the pie to the center.
label: stringText inside pie chart. Defaults to percent if not given.
label-small: stringSmall label below main label. Defaults to empty string if not given.
color: stringColor of pie chart.
opacity: numberOpacity of pie chart. 0 is transparent, 1 is opaque.
git clone https://github.com/arve0/vue-pie-chart
cd vue-pie-chart
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
For detailed explanation on how things work, consult the docs for vue-loader.
MIT
FAQs
Vue pie chart component
The npm package vue-pie-chart receives a total of 174 weekly downloads. As such, vue-pie-chart popularity was classified as not popular.
We found that vue-pie-chart 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
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.

Research
More than 140 Mastra npm packages were compromised in a supply chain attack that used a typosquatted dependency to deliver a cross-platform infostealer during installation.

Research
/Security News
A new npm package tests AI malware scanners with prompt injection, safety-triggering comments, context flooding, and obfuscated JavaScript.