You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

chartjs-plugin-roughness

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chartjs-plugin-roughness

Make your chart.js roughness

1.0.6
latest
Source
npmnpm
Version published
Weekly downloads
9
-52.63%
Maintainers
1
Weekly downloads
 
Created
Source

chartjs-plugin-roughness

demo

Usage

h5

import 'chartjs-plugin-roughness'

new Chart(..., {
  ...,
  plugins: {
    roughness: {
      disabled: true // enable by default if imported chartjs-plugin-roughness
      // more rough options
    }
  }
})

SSR

@napi-rs/canvas is supported for SSR, see demo.

Rough Options

See rough options for more options.

Caution

  • This package should be imported before chart.js.
  • This package override BarElement.draw method if roughness was enabled.
  • This package override Filler hooks for clearing stroke colors to prevent area border.
  • This package override beginPath, closePath, fill, stroke, moveTo, lineTo, arcTo, arc, quadraticCurveTo, rect, ellipse, bezierCurveTo while roughness chart rendering. ellipse was not implemented by roughjs, you should provide your own polyfill if you want this feature.
  • This package override window.Path2D class and should act same as original.
  • This package override TooltupPlugin class to skip drawing tooltip background using roughness. Set tooltip plugin option preventSkipBackgroundRoughness to true to prevent it.

Keywords

Chart.js

FAQs

Package last updated on 25 Jun 2023

Did you know?

Socket

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.

Install

Related posts