Charts.css

用于数据可视化的开源CSS框架。Charts.css 可帮助前端开发人员使用简单的 CSS 类将数据转化为精美的图表和图形。「Open source CSS framework for data visualization. Charts.css help frontend developers turn data into beautiful charts and graphs using simple CSS classes.」

Github星跟蹤圖

Charts.css

GitHub Version Minified Size GitHub Repo stars License

Charts.css is an open source CSS framework for data visualization.

Visualization help end-users understand data. Charts.css help frontend developers turn data into beautiful charts and graphs using simple CSS classes.

No dependencies. 72kb file size. Less than 6kb gzipped file size!

Documentation

Check the full documentation on ChartsCSS.org.

Installation

CDN

Use jsdelivr CDN:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/charts.css/dist/charts.min.css">

Or unpkg CDN:

<link rel="stylesheet" href="https://unpkg.com/charts.css/dist/charts.min.css">

Package Manager

Install using npm:

npm install charts.css

Or using yarn:

yarn add charts.css

Usage

The data is structured using semantic HTML tags and styled using CSS classes which change the visual representation displayed to the end user.

<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>

The framework offers developers flexibility. You choose what components to display and how to style them. Each component offers several CSS classes and CSS variables to customizes your style.

The key feature is the ability to customize everything using basic CSS. Frontend developers can target any HTML element and customize it. This philosophical guideline is what makes the framework so flexible, easy and fun to use.

Questions

For questions and support please use the official forum on GitHub.

Liked Charts.css?

If you like the project, please consider to star the repo on GitHub.

License

Charts.css is licensed under the MIT license.

主要指標

概覽
名稱與所有者ChartsCSS/charts.css
主編程語言HTML
編程語言SCSS (語言數: 3)
平台
許可證MIT License
所有者活动
創建於2020-09-26 12:27:00
推送於2024-05-02 01:59:48
最后一次提交
發布數14
最新版本名稱1.1.0 (發布於 )
第一版名稱0.1.0 (發布於 )
用户参与
星數6.5k
關注者數74
派生數180
提交數252
已啟用問題?
問題數46
打開的問題數27
拉請求數40
打開的拉請求數2
關閉的拉請求數5
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?