@rowno/sparkline
Advanced tools
Weekly downloads
Changelog
4.0.0
"sideEffects": false
to the package.json
.Readme
Lightweight React sparklines β¨ π
yarn add @rowno/sparkline
# or
npm install --save @rowno/sparkline
function Spark() {
const lines = [
{
values: [789, 880, 676, 200, 890, 677, 900],
colors: {
area: 'rgba(217, 227, 237, 0.5)',
line: '#193652'
}
}, {
values: [354, 456, 200, 566, 344, 467, 545],
colors: {
area: 'rgba(199, 228, 255, 0.5)',
line: '#004585'
}
}
]
return (
<Sparkline
width={56}
height={12}
lines={lines}
/>
)
}
Outputs:
{
width: 56,
height: 12,
lines: [{
values: [789, 880, 676],
colors: {
area: 'rgba(217, 227, 237, 0.5)',
line: '#193652'
},
title: 'Allowed events',
key: 'allowed'
}]
}
Type: number
(required)
Width of the sparkline.
Type: number
(required)
Height of the sparkline.
Type: array<object>
(required)
Objects defining the lines to draw.
Type: array<number>
(required)
Numbers that make up the data points of the line.
Type: object
Custom colors for the line.
Type: string
Color of the line's filled in area.
Type: string
Color of the line's stroke.
Type: string
title
of the line. Shown as a tooltip in the browser.
Type: any
Unique React key
of the line.
sparkline is released under the ISC license.
Copyright Β© 2017, Roland Warmerdam.
FAQs
Lightweight React sparklines β¨ π
The npm package @rowno/sparkline receives a total of 1,227 weekly downloads. As such, @rowno/sparkline popularity was classified as popular.
We found that @rowno/sparkline 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 installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.