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

flowing-liquid

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

flowing-liquid

A component for building flowing chart

  • 0.4.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

flowing-liquid npm

A component for building flowing chart.

Online demo

Installing

# yarn
yarn add flowing-liquid

# npm
npm i flowing-liquid --save

Usage

Notice: Only el option is required.

import FlowingLiquid from 'flowing-liquid'

const flowingLiquid = new FlowingLiquid({
  el: '#chart', // canvas element, required
  canvasWidth: 300, // canvas element width
  canvasHeight: 300, // canvas element height
  waterline: 60, // target waterline
  flowingBody: [
    {
      waveWidth: 0.055, // wave width
      waveHeight: 4, // wave height
      colors: ['#F39C6B', '#A0563B'], // a css color Array or css color String
      xOffset: 0, // start point offset, based on y-axis
      speed: 0.08 // flowing speed
    },
    {
      waveWidth: 0.04,
      waveHeight: 7,
      colors: ['rgba(243, 156, 107, 0.48)', 'rgba(160, 86, 59, 0.48)'],
      xOffset: 2,
      speed: 0.02
    }
  ],
  // set canvas background color
  background: {
    color: 'dodgerblue',
    style: 'fill'
  },,
  // indicator text, default value is parameter waterline
  font: {
    bold: true,
    color: '',
    size: 50,
    family: 'Microsoft Yahei',
    text: ''
  }
})

// 1st parameter means multiple waves spacing
// 2nd parameter means if canvas element show indicator text
flowingLiquid.render(5, true)

FAQs

Package last updated on 28 Nov 2018

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