Skip to content

Instantly share code, notes, and snippets.

View brattonc's full-sized avatar

Curtis Bratton brattonc

View GitHub Profile
@brattonc
brattonc / README.md
Last active November 20, 2023 17:14
D3 Liquid Fill Gauge

Liquid 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.
@brattonc
brattonc / README.md
Last active March 28, 2021 12:00
D3 Rectangular Area Chart

A D3 Rectangular Area Chart with animated filling.

Configurable features include:

  • Configurable maximum value. The chart will use either the maximum value of data it's provided, or a maximum value that you specify through configuration. This is especially useful if you're using multiple charts at the same time and you want their relative sizes to be the same regardless of their data.
  • Expansion direction. I.E. which corner does the chart expand from.
  • Animation on/off.
  • Configurable delay between chart load and animation start.
  • Configurable delay between the start of the expansion animation for each area block.
  • Area block colors and text colors.
@brattonc
brattonc / README.md
Last active March 28, 2021 12:00
D3 Bar Stacker Gauge

A D3 Bar Stacker Gauge with animated filling.

Configurable features include:

  • Configurable minimum and maximum values.
  • Configurable corner rounding.
  • Padding.
  • Color.
  • Horizontal or verticle layout.
  • Text size.