Beautiful Easy To Use SVG Bar Charts Built-in JavaScript

Bar.js is a JavaScript library that creates HTML-based bar charts. The library supports a wide range of use cases, including negative values, vertical and horizontal plots, as well as multi-axis data.

create bar graph in html code example, javascript bar chart, bar chart js, create a bar graph with html5 canvas and javascript, bar chart html css javascript

Pure CSS Making A Flexbox Bar Graphs Plugin

How to make use of it:

1. Import the CSS bar.css file in the header, and the JS bar.js file for the document.

<link rel="stylesheet" href="bar.css">
<script src="bar.js"></script>

2. Create a container to hold your bar chart.

<div id="chart"></div>

3. Prepare the data you want to provide.

const params = {
  data: [
      {
          x: 97,
          y: 210
      },
      {
          x: 50,
          y: 180
      },
      {
          x: 110,
          y: 190
      },
      {
          x: 78,
          y: 183
      },
      {
          x: 50,
          y: 210
      },
      {
          x: 90,
          y: 198
      },
      {
          x: 50,
          y: 180
      },
      {
          x: 110,
          y: 190
      }
  ]
};

4. Create a virtual bar chart inside the container you created.

const chart = new Chart('#chart', params);

5. Configure the bar chart with the following options.

const params = {
      iterations: 2,
      labels: {
        x: 'X label',
        y: 'Y label'
      },
      data: [],
      spacing: 0,
      mode: 'vertical' // or horizontal
};

Generate Bar Column Chart, Bar.js Plugin/Github


See Demo And Download

Official Website(themaxsandelin): Click Here

This superior jQuery/javascript plugin is developed by themaxsandelin. For extra Advanced Usages, please go to the official website.

Related Posts

responsive-lightbox-image-gallery-jquery

Responsive Image Gallery & Lightbox Plugin using Bootstrap

Bootstrap Gallery With this script and Bootstrap 4, you can easily create an image gallery. You just have to put the thumbnails on the page. The BS Gallery…

GLightbox-Lightbox-Gallery

Stylish Any Lightbox Gallery Content in Pure JavaScript | GLightbox

GLightbox is a pure JavaScript lightbox. It can display images, iframes, embedded content, and videos with optional autoplay for YouTube, Vimeo, and even self-hosted videos. Simplified rendering…

HTML-Table-Custom-Filters

[Custom Filters] Apply Filter to Every Column in the HTML Table | Filter.js

HTML Table Custom Filters – A very small (less than 1 KB) table filter plugin to create a lookup field for every column in your HTML table…

JS-Cloudimage-360-View

How to Create a 360 Product View Using JavaScript | JS Cloudimage

Cloud image 360 View is a simple, interactive resource that can be used to provide a virtual tour of your product. Attract your customers with a stunning…

jQuery-SpriteSpin-Animation-Plugin

jQuery SpriteSpin Animation Plugin | Product Image Viewer

SpriteSpin is a jQuery plugin that converts image frames into animation. Requires an array of photos or striped pattern sheets and running them frame-by-frame like a moving…

apexcharts-js

A Modern Interactive JavaScript Charts Based on SVG | apexcharts.js

ApexCharts is now a partner of FusionCharts, offering a wide range of data visualization components. It offers advanced maps, metrics, widgets, time series charts, and more. A…