HTML5 Canvas Bar Indicator jQuery Jindicator - Download HTML5 Canvas Bar Indicator Plugin For jQuery - Jindicator

Download HTML5 Canvas Bar Indicator Plugin For jQuery – Jindicator

Posted on

This time I will share jQuery Plugin and tutorial about HTML5 Canvas Bar Indicator Plugin For jQuery – Jindicator, hope it will help you in programming stack.

HTML5 Canvas Bar Indicator jQuery Jindicator - Download HTML5 Canvas Bar Indicator Plugin For jQuery - Jindicator
File Size: 13.6 KB
Views Total: 1928
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Jindicator is a jQuery plugin that makes it easy to draw a dynamic, highly customizable bar chart/indicator on an HTML5 canvas element.

How to use it:

1. Load the jQuery Jindicator plugin’s script after jQuery library (slim build is recommended) like this:

1 <script src="//code.jquery.com/jquery-3.2.1.slim.min.js"></script>
2 <script src="jquery.JIndicator.js"></script>

2. Create a placeholder element for the canvas bar indicator.

1 <div id="demo"></div>

3. Initialize the plugin and define your own data set to be represented in the bar indicator.

1 $('#demo').JIndicator({
2  
3   // scales
4   barValues: [, 20, 60,],
5  
6   // current value
7   indicatorValue: 50
8  
9 });

4. Override the following options to change the default appearance of the bar indicator.

01 $('#demo').JIndicator({
02  
03   canvasHeight: 70,
04   canvasWidth: 500,
05   startX: 10,
06   barHeight: 12,
07   barWidth: 150,
08   barColor: {
09     left: '#7BD6FD',
10     middle: '#77DE8B',
11     right: '#FFC977'
12   },
13   indicatorColor: 'auto',
14   numberText: {
15     color: '#000000',
16     fontSize: 13,
17     fontFamily: 'Arial',
18     align: 'left',
19     fontHeight: 12
20   }
21  
22 });

5. Customize the legends as per your needs:

01 $('#demo').JIndicator({
02  
03   legend: {
04     data: ['low', 'middle', 'high'],
05     textColor: '#000000'
06   },
07   legendHeight: 15,
08   legendProperty : {
09     height: 15,
10     width: 24,
11     margin: 15,
12     radius: 4
13   }
14  
15 });

This awesome jQuery plugin is developed by chenxing2. For more Advanced Usages, please check the demo page or visit the official website.

source : jqueryscript.net