Coder Social home page Coder Social logo

oooh-name / csscharts.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thysultan/csscharts.js

0.0 0.0 0.0 433 KB

jquery plugin to create donut and bar charts with css

Home Page: http://thysultan.com/projects/cssCharts/

JavaScript 64.52% CSS 24.21% HTML 11.27%

csscharts.js's Introduction

cssCharts.js

jquery plugin to create simple donut, bar or line charts with dom nodes. style with css.

http://thysultan.com/projects/cssCharts/

Include:

<link rel="stylesheet" href="chart.css">
<script src="jquery.chart.js"></script>

run:

$('.bar-chart').cssCharts({type:"bar"});
$('.donut-chart').cssCharts({type:"donut"});
$('.line-chart').cssCharts({type:"line"}); 

example donut/pie chart

optional: to trigger countUp counter for the donut chart as seen on the preview page.

$('.donut-chart').cssCharts({type:"donut"}).trigger('show-donut-chart');

add "pie-chart" class to .donut-chart if you want to convert it to a pie chart, i.e

<div class="donut-chart pie-chart" data-percent="0.61" data-title="uptime %"></div>

example line chart

<ul data-cord="[x1,x2,x3,x4],[y1,y2,y3,y4]" class="line-chart"></ul>
$('.line-chart').cssCharts({type:"line"});
  • insure x cordinates are 0 - ascending.
  • insure y cordinates are 0 or greater.

example bar chart

<ul class="bar-chart" data-bars="[x1,x2],[y1,y2]" data-max="10" data-unit="k" data-grid="1" data-width="24">
$('.bar-chart').cssCharts({type:"bar"});

style to your hearts content, see index.html for an example implementation.

csscharts.js's People

Contributors

thysultan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.