Giter VIP home page Giter VIP logo

respchartjs's Introduction

responsive Chart.js

This distribution extending Chart.js capability by adding responsive feature. Whole tribute and source of Chart.js can be download and update on its origin repository + documentation

i'am wrap this feature in file chartjs-option.js through function

respChart(selector,data)

Setting

  1. Import Chart.js source at the first place. i recomended the head.js power to doing this

  2. Import chartjs-option.js after step 1 declaration and make sure that this part only be execute after Chart.js ready.

  3. Create a canvas and make sure it has container.

     ...
     <canvas class="myChart" width="800" ></canvas>
     ...
    
  4. Prepare your data

     <script>
     ...
     var data = {
     	labels : ["January","February","March","April","May","June","July"],
     	datasets : [
     		{
     			fillColor : "rgba(151,187,205,0.5)",
     			strokeColor : "rgba(151,187,205,1)",
     			pointColor : "rgba(151,187,205,1)",
     			pointStrokeColor : "#fff",
     			data : [28,48,40,19,96,27,100]
     		}
     	]
     };
     ...
    
  5. Call the extended function

     respChart($(".myChart"),data);
    
  6. Enjoy your responsive chart

respchartjs's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

respchartjs's Issues

Problems with iPhone

Hello,

When I look at a chart at IPhone it works fine.
If rotate the iPhone from portrait to landscape the chart is resized ...

But if I keep rotate back to portrait the chart does not get the correct dimension.

And gets worse and worse each time I rotate the phone after the first rotation.

Any idea why?

Thank You,
Miguel

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.