Code Monkey home page Code Monkey logo

adapt-chartjs's Introduction

adapt-chart

This is a fork of adapt-chartjs.

This is a container for displaying Chart.js charts in the Adapt framework and authoring tool. You will need to read the Chart.js documentation to create charts using this plugin.

Installation

Attributes

core model attributes: These are inherited by every Adapt component. Read more.

_component (string): This value must be: chart.

_classes (string): CSS class name to be applied to Chart’s containing div. The class must be predefined in one of the Less files. Separate multiple classes with a space.

_layout (string): This defines the horizontal position of the component in the block. Acceptable values are full, left or right.

instruction (string): This optional text appears above the component. It is frequently used to guide the learner’s interaction with the component.

_chartType (string): Select the type of chart to display.

_height (number): Set the height of the chart

data (object): Set datasets and labels. See Chart.js documentation for details.

Line chart example for authoring tool:

{
    "labels": ["Eating", "Drinking", "Sleeping", "Designing", "Coding", "Cycling", "Running"],
    "datasets": [{
        "label": "My First dataset",
        "backgroundColor": "rgba(179,181,198,0.2)",
        "borderColor": "rgba(179,181,198,1)",
        "pointBackgroundColor": "rgba(179,181,198,1)",
        "pointBorderColor": "#fff",
        "pointHoverBackgroundColor": "#fff",
        "pointHoverBorderColor": "rgba(179,181,198,1)",
        "data": [65, 59, 90, 81, 56, 55, 40]
    }, {
        "label": "My Second dataset",
        "backgroundColor": "rgba(255,99,132,0.2)",
        "borderColor": "rgba(255,99,132,1)",
        "pointBackgroundColor": "rgba(255,99,132,1)",
        "pointBorderColor": "#fff",
        "pointHoverBackgroundColor": "#fff",
        "pointHoverBorderColor": "rgba(255,99,132,1)",
        "data": [28, 48, 40, 19, 96, 27, 100]
    }]
}

_options (object): Add specifc chart options here. See Chart.js docs.

Line chart example for authoring tool:

{
    "title": {
        "display": true,
        "text": "Custom Chart Title"
    }
}

JSON Examples

Accessibility

Limitations


Version number: 0.0.1 adapt learning logo Framework versions: 2.0
Author / maintainer: Dan Gray contributors
Accessibility support: No
RTL support: No
Cross-platform coverage: Chrome, Firefox (ESR + latest version), Edge 12, IE 11, IE10, IE Mobile 11, Safari for iPhone (iOS 8+9), Safari for iPad (iOS 8+9), Safari 8

adapt-chartjs's People

Contributors

dancgray avatar samumist avatar

Watchers

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