Giter VIP home page Giter VIP logo

chart.js's Introduction

Chart.js

It can draw gantt image now!

Simple HTML5 Charts using the canvas element chartjs.org

Sample

请下载Chart.js, test.js, test.html到本地同一目录下,然后打开test.html即可查看效果

How to use

使用方式同Chart.js一样:

<script type="text/javascript" src="Chart.min.js"></script>
<canvas id="myChart1" width="800" height="400"></canvas>

var ctx1 = document.getElementById("myChart1").getContext("2d");
var myNewChart = new Chart(ctx1).Gantt(data);

数据结构

var data = {
  start: "2014-01-20",
  totalWeeks: 9,
  tasks: [{
    name: "Today I need go to school",
    from: 0,
    to: 4
  },
  {
    name: "界面设计",
    from: 4,
    to: 7
  },
  {
    name: "数值分析",
    from: 3,
    to: 5
  },
  {
    name: "关卡分析",
    from: 5,
    to: 7
  },
  {
    name: "测试",
    from: 8,
    to: 9
  }
}

Documentation

You can find documentation at chartjs.org/docs.

License

Chart.js was taken down on the 19th March. It is now back online for good and IS available under MIT license.

Chart.js is available under the [MIT license] (http://opensource.org/licenses/MIT).

chart.js's People

Contributors

nnnick avatar huster-zhangpeng avatar robocoder avatar esamattis avatar fizerkhan avatar ilyakatz 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.