Volume Meter


Html

JavaScript
/* Options */
var options = {
  // Minimum value at the bottom
  min: {
    // Font color.
    fontColor: '#dc3547',
    // Number value.
    value: 0,
    // Background color.
    bgColor: '#000000'
  },
  // Maximum value at the top.
  max: {
    // Font color.
    fontColor: '#dc3547',
    // Number value.
    value: 1000,
    // Background color.
    bgColor: '#000000'
  },
  // Bar,
  bar: {
    // Border color.
    borderColor: '#000000',
    // Bar fill color.
    fillColor: '#123456',
    // Bar color gradient or not.
    graident: true,
    // Scrolling speed.
    speed: 5
  },
  // Marker,
  marker: {
    // Background color.
    bgColor: '#28a748',
    // Font color.
    fontColor: '#ffffff'
  },
  // Actual number value.
  value: 0
}
/* Constructor */
var volumeMeter = new zeu.VolumeMeter('volume-meter', options);

/* Setter */
volumeMeter.value = 300;
volumeMeter.barFillColor = '#123456';
volumeMeter.markerBgColor = '#28a748';

More examples

Increase view height to 300. Change bar color based on the value.