Posted in linux
5147
8:33 am, March 18, 2021
 

Creating a chart about charts.css with charts.css from the command line

Creating a chart about charts.css with charts.css from the command line:

BASH

 (
      echo "<table class='charts-css bar show-labels show-heading'>"
      echo "<caption>Size of Charts.css releases</caption>"
      for version in $(curl -sS https://github.com/ChartsCSS/charts.css/releases | grep -o releases/tag/[0-9.]* | cut -d/ -f3 | tac); do
        url=https://cdn.jsdelivr.net/npm/charts.css@$version/dist/charts.min.css
        size=$(($(curl -sS "$url" | wc -c)/1024))
        echo "<tr><th>v$version</th><td style='--size: calc($size/100)'>${size}KiB</td></tr>"
      done
      echo "</table><link rel=stylesheet href='$url'>"
    ) > size-chart.html

Result: https://jsfiddle.net/wcfez6oq/

This is untested but thought it was cool, saved from here : https://news.ycombinator.com/item?id=26494819 

View Statistics
This Week
99
This Month
446
This Year
393

No Items Found.

Add Comment
Type in a Nick Name here
 
Search Code
Search Code by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

Subscribe to weekly updates about things i have added to the site or thought interesting during the last week.

You could also follow me on twitter or not... does anyone even use twitter anymore?

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote
In this case my anchor this week becomes driving almost 2hrs outside of Atlanta to one of my favorite hard core gyms in the world.. MetroFlex aka The Dungeon. The gym owners turn the heat way up so it becomes a fun sweat box and the gym members just watch from afar and leave me alone. I happily drive myself long distances to find MY ANCHOR. Our anchor allows us to have balance, focus and be as productive as possible. And if you're in the middle of a heavy set and your headphones start to fall off your head, like mine did here.. well.. f*ck the headphones. Let em break and fall. You can always get a new pair, but the iron ain't ever gonna lift itself.
Unknown
Random CSS Property

text-emphasis

The text-emphasis CSS property applies emphasis marks to text (except spaces and control characters). It is a shorthand for text-emphasis-style and text-emphasis-color.
text-emphasis css reference