Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

waterball

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

waterball

A Canvas Graph library

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Light cross-platform Graph,Custom Configuration and animation supported

NPM

Demo

https://zedwang.github.io/waterball/demo/index.html

  • The component supported AMD、CMD and standalone model
Install with standalone
<script src='/path/water-ball.min.js'></script>
<div id='container'></div>
var options = {
    value: 30,
    r: 100,
    color: '#787878'
}

var container  = document.getElementById('container')

var wb = new WaterBall(container, options);

// update

wb.setOptions({value:50})

Install with NPM
$ npm install waterball

This will install waterBall NPM packages.

Methods

setOptions(key,value)/setOptions(Object)

  • value 0~100

destroy()

  • destroy instance

Options

FieldTypeDefaultdescription
fillString/Array#fff
waveStyleString/Array['#5bf6a1','#2bdb72']
waveWidthFloat0.02
waveHeightInt8
speedFloat.1
borderColorString#2bdc76
borderWidthInt2
valueFloat0
colorString#fff
fontSizeString25px microsoft yahei
textAlignStringcenter
extString%
formatFunctionnullformat: function(value) { return value + 'kg'}

Support

FAQ

https://github.com/zedwang/waterball/issues

Supported browsers

Directives from this repository are automatically tested with the following browsers:

  • Chrome (stable and canary channel)

  • Firefox

  • IE 9 and 10

  • Opera

  • Safari

Modern mobile browsers should work without problems.

Keywords

FAQs

Package last updated on 04 Mar 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc