GithubHelp home page GithubHelp logo

barchartjs's Introduction

barChartJS

Lightweight, configurable and simple bar chart library in JS

Description

barChartJS is a Canvas based simple Javascript Bar Chart Library to provide a configurable, lightweight and dependency-free experience.

Installation Guide

Download the barChart.min.js and include it in your project

<script src="barChart.min.js"></script>

Usage

To create the bar chart, you need a block level container like a div or p.

<div id="chart">This will be bar chart!</div>

Then you can create the BarChart object in your JavaScript file

const bacrChart = new BarChart(chartId, chartWidth, chartHeight, data);

Parameters

  • chartId - containerId (String) Defines the id of container like "chart"

  • chartWidth (Interger) Define the width of the chart like 500

  • data (Objects Array) Defines the data objects. The objects should have 2 key-value pairs: label and value. Example data:

  const data = [
    { label: "Jan", value: 23 },
    { label: "Feb", value: 11 },
    { label: "Mar", value: 55 },
    { label: "Apr", value: 893 },
    { label: "May", value: 343 }
  ];

Licence

MIT © dave

barchartjs's People

Contributors

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