Giter Club home page Giter Club logo

chartjs-heatmap's Introduction

chartjs-heatmap

Installation

Add the Chart.js 2 library :

https://github.com/chartjs/Chart.js

Import the library after Chart.js :

<script src="path/to/lib/heatmap.js"></script>

Example of usage

var heatmap = new Chart(element, {
    type: 'heatmap',
    data: {
        xLabels: ['2014', '2015', '2016', '2017'],
        yLabels: ['Strength', 'Intelligence', 'Stamina', 'Spirit'],
        datasets: [{
            data: [{
                y: 0, // index of 'Strength'
                x: 0, // index of '2014'
                a: 0.5, // alpha of the color [0, 1]
                v: 500, // value
            }, {
                y: 2, // index of 'Stamina'
                x: 0, // index of '2014'
                a: 0.2, // alpha of the color [0, 1]
                v: 250, // value
            }, {
                 y: 1, // index of 'Intelligence'
                 x: 3, // index of '2017'
                 a: 1, // alpha of the color [0, 1]
                 v: 1000, // value
            }]
        }]
    },
    options: {
        yColors: [ // colors for each lines
            {r: 0,   g: 150, b: 136},
            {r: 255, g: 235, b: 59},
            {r: 255, g: 152, b: 0},
            {r: 244, g: 67,  b: 54}
        ],
    }
});

chartjs-heatmap's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

chartjs-heatmap's Issues

Don't works

Anyway.

Firefox 70 Ubuntu.

'heatmap' is not type of chart.

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.