Posted in linux
5248
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
55
This Month
414
This Year
494

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


Random CSS Property

@viewport

Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
min-height (@viewport) css reference