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.
#!/bin/bash | |
RAW_STATUS=$(python3 ~/src/starlink-grpc-tools/dish_grpc_text.py -s 2 status) | |
STARLINK_CONNECTED=$(echo "$RAW_STATUS" | cut -f 5 -d',') | |
if [[ "${STARLINK_CONNECTED}" == "CONNECTED" ]]; then | |
STARLINK_CONNECTED='${color green}'"CONNECTED"'${color}' | |
elif [[ "${STARLINK_CONNECTED}" == "OFFLINE" ]]; then | |
STARLINK_CONNECTED='${color red}'"OFFLINE"'${color}' | |
else | |
STARLINK_CONNECTED='${color yellow}'"${STARLINK_CONNECTED}"'${color}' |
A D3 Bar Stacker Gauge with animated filling.
Configurable features include:
Liquid Fill Gauge v1.1 - 7/14/2015
Changes:
Configurable features include:
After seeing this site http://fitzfitzpatrick.com/ I decided to give a try to the "direction-aware hover effect". My first thought was to do it with a pure CSS, not too late I changed my mind and decided to use JS (I need to sleep anyway).
It's kind of simple, using JS we can easily detect the direction the cursor is coming, then, I am using CSS animations for each case (8 in total).
A Pen by Noel Delgado on CodePen.
import numpy as np | |
def func(t): | |
if (t > 0.008856): | |
return np.power(t, 1/3.0); | |
else: | |
return 7.787 * t + 16 / 116.0; | |
#Conversion Matrix | |
matrix = [[0.412453, 0.357580, 0.180423], |
import sys | |
try: | |
from Polygon import * | |
except ImportError as e: | |
print 'Requires Polygon module from https://github.com/jraedler/Polygon2.' | |
print '' | |
print 'Try to install as follows:' | |
print '' | |
print 'git clone https://github.com/jraedler/Polygon2.git' |
import os, os.path, sys, urllib2, requests | |
class PyPiError(Exception): | |
def __init__(self, value): | |
self.value = value | |
def __str__(self): | |
return repr(self.value) | |
def _chunk_report(bytes_so_far, chunk_size, total_size): | |
if (total_size != None): |