Research
Security News
Malicious PyPI Package ‘pycord-self’ Targets Discord Developers with Token Theft and Backdoor Exploit
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
chartjs-plugin-dragdata
Advanced tools
A plugin for Chart.js >= 2.4.0
Makes data points draggable. Supports touch events.
Online demo single Y-Axis, dual Y-Axis,small chart,bubble chart.
To make (line and bubble chart) data points draggable, simply add dragData: true
to the config section of the chart instance. If you (additionally to the y-axis) would like to drag data along the x-axis, you may also add dragX: true
.
Individual event listeners can be specified as follows:
{
...
dragData: true,
dragX: false,
onDragStart: function (event, element) {
},
onDrag: function (event, datasetIndex, index, value) {
},
onDragEnd: function (event, datasetIndex, index, value) {
}
}
When dragging data points towards the outer boundaries of the y-axis, one may experience unexptected (fast) changes to the y-axis scale. Therefore, depending on the use case, it may be recommended to fix the y-scale using similar options as follows (especially on small charts):
options: {
scales: {
yAxes: [{
ticks: {
max: 25,
min: 0
}
}]
},
...
To install via npm:
npm install chartjs-plugin-dragdata --save
Or, download a release archive file from the dist folder.
Please feel free to submit an issue or a pull request!
chartjs-plugin-dragdata.js is available under the MIT license.
FAQs
Draggable data points for Chart.js
The npm package chartjs-plugin-dragdata receives a total of 9,823 weekly downloads. As such, chartjs-plugin-dragdata popularity was classified as popular.
We found that chartjs-plugin-dragdata demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.