1.0.6 • Published 10 months ago

chartjs-plugin-roughness v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

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.
1.0.6

10 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago