charts.css

repository·main·Indexed 27 days ago

https://github.com/chartscss/charts.css

An open-source CSS framework for data visualization that enables the creation of charts using semantic HTML and CSS classes without JavaScript dependencies. Version 1.2.0.

Tokens
571
Snippets
2
Records
3
Agent score
42%

What's inside charts.css

  1. Use Charts.css for data visualization

    main

    Charts.css turns semantic HTML tables into charts using specific CSS classes. Data values are typically represented using the --size CSS variable on <td> elements to control the visual scale of the data point.

    <table class="charts-css [ column ] [ show-primary-axis show-4-secondary-axes ] [ data-spacing-4 reverse-data ]">
    
      <caption> Front End Developer Salary </caption>
    
      <thead
        <tr
          <th scope="col"> Year </th
          <th scope="col"> Income </th
        </tr
      </thead
    
      <tbody
        <tr
          <th scope="row"> 2016 </th
          <td style="--size: calc( 40 / 100 );"> $ 40K </td
        </tr
        <tr
          <th scope="row"> 2017 </th
          <td style="--size: calc( 60 / 100 );"> $ 60K </td
        </tr>
        <tr
          <th scope="row"> 2018 </th
          <td style="--size: calc( 75 / 100 );"> $ 75K </td
        </tr
        <tr
          <th scope="row"> 2019 </th
          <td style="--size: calc( 90 / 100 );"> $ 90K </td
        </tr
        <tr
          <th scope="row"> 2020 </th
          <td style="--size: calc( 100 / 100 );"> $ 100K <br> 👑 </td
        </tr
      </tbody>
    
    </table>