D3 Liquid Fill Gauge
Six animated liquid fill gauges display percentage values inside circular containers, with each gauge customized through different colors, wave heights, speeds, and text positions. Clicking any gauge triggers an update that animates the value and wave behavior. The implementation uses D3 v3 with SVG rendering, building wave shapes from generated data points and scaling functions. The `loadLiquidFillGauge` function returns an object with an `update` method, which transitions the gauge to a new randomly generated value while animating the wave rise, scroll, and text count-up effects.
AI-generated descriptionLiquid Fill Gauge v1.1 - 7/14/2015
Changes:
- Added support for updating the gauge value after loading is complete. The loadLiquidFillGauge method now returns an object with an update method which allows the gauge value to be changed. Click any of the gauges above to randomly update their value.
Configurable features include:
- Changeable min/max values.
- All colors.
- Outer circle thickness.
- Gap between the outer circle and inner fill area.
- Wave height.
- Wave speed.
- Wave count.
- Wave rise time.
- Wave height scaling on/off. Reduces the wave height near the min/max values so that the wave won't make the fill area appear total full or totally empty.
- Wave starting offset. Most useful when wave animation is turned off and you want the wave min or max at a specific horizontal position in the fill area.
- Wave rising upon load on/off.
- Wave animation on/off.
- Text height.
- Text vertical position.
- Text increment from min value upon loading.
- Display of % symbol on/off.
Open source under BSD 2-clause
Copyright (c) 2015, Curtis Bratton
All rights reserved.
forked from <a href='http://bl.ocks.org/brattonc/'>brattonc</a>'s block: <a href='http://bl.ocks.org/brattonc/5e5ce9beee483220e2f6'>D3 Liquid Fill Gauge</a>