
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
chartist-plugin-legend
Advanced tools
Implements a legend for Chartist charts.
$ npm install chartist-plugin-legend --save
As styles are very different with each project, no CSS is included. You can copy paste this to use as base:
.ct-legend {
position: relative;
z-index: 10;
li {
position: relative;
padding-left: 23px;
margin-bottom: 3px;
}
li:before {
width: 12px;
height: 12px;
position: absolute;
left: 0;
content: '';
border: 3px solid transparent;
border-radius: 2px;
}
li.inactive:before {
background: transparent;
}
&.ct-legend-inside {
position: absolute;
top: 0;
right: 0;
}
@for $i from 0 to length($ct-series-colors) {
.ct-series-#{$i}:before {
background-color: nth($ct-series-colors, $i + 1);
border-color: nth($ct-series-colors, $i + 1);
}
}
}
In an example chart:
require('chartist-plugin-legend');
new Chartist.Bar('.ct-chart', data, {
stackBars: true,
plugins: [
Chartist.plugins.legend()
]
},
});
Option | Description | Type | Default |
---|---|---|---|
className | Adds a class to the ul element. | string | '' |
clickable | Sets the legends clickable state; setting this value to false disables toggling graphs on legend click. | bool | true |
legendNames | Sets custom legend names. By default the name property of the series will be used if none are given. | mixed | false |
onClick | Accepts a function that gets invoked if clickable is true. The function has the chart , and the click event (e ), as arguments. | mixed | false |
classNames | Accepts a array of strings as long as the chart's series, those will be added as classes to the li elements. | mixed | false |
removeAll | Allow all series to be removed at once. | bool | false |
position | Sets the position of the legend element. top , bottom or any DOM2 Element are currently accepted. If a DOM Element is given, the legend will be appended as it's last child. | `'top' | 'bottom' |
FAQs
Legend plugin for Chartist.js.
The npm package chartist-plugin-legend receives a total of 3,666 weekly downloads. As such, chartist-plugin-legend popularity was classified as popular.
We found that chartist-plugin-legend demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.