Official Site | Samples | Download | Documentation | Forum | Twitter
Introduction
jqChart is a jQuery plugin to draw charts and graphs using HTML5 canvas. jqChart produces Excel like charts with many features.
Some of the key features are:
- High performance rendering.
- Real-time chart manipulation.
- Support for unlimited number of data series and data points.
- Support for unlimited number of chart axes.
- True DateTime Axis.
- Logarithmic and Reversed axis scale.
- Large set of chart types - Column, Stacked Column, Bar, Stacked Bar, Line, Spline, Area, Spline Area, Pie, Scatter, Bubble.
- Financial Charts - Stock Chart and Candlestick Chart
- The different chart types can be easily combined.
- Sensible defaults for ease of use.
System Requirements
jQuery JavaScript framework is required. We recommend using the latest official stable version of the jQuery library.
Browser Support
jqChart supports all major browsers:
- Internet Explorer - 6+
- Firefox
- Google Chrome
- Opera
- Safari
Installation
Download and unzip the contents of the archive to any convenient location. The package contains the following folders:
- [js] - The javascript files of jqChart (and the needed libraries). You need to include them in your HTML page, in order to gain the client side functionality of the chart. The first file is "jquery-1.4.4.min.js" - this is the official jQuery library on which jqChart is built upon. The second file you need is the "excanvas.js" javascript file. It is used from the versions of IE, which don't support canvas graphics. The last one is the jqChart javascript code itself, located in "jquery.jqChart.min.js"
- [samples] - Contains some examples that use the jqChart. For full list of samples plese visit - jqChart Samples
Include the Files
jqChart requires jQuery. jQuery 1.4.4 is included in the distribution. To use jqChart include jquery, the jqChart jQuery plugin and optionally the excanvas script for IE support in your web page:
<script src="../js/jquery-1.4.4.min.js" type="text/javascript"></script>
<script src="../js/jquery.jqChart.min.js" type="text/javascript"></script>
<!--[if IE]><script lang="javascript" type="text/javascript"
src="../js/excanvas.js"></script><![endif]-->
IMPORTANT: Use the 'excanvas.js' included in our package. It has some modifications and it is a little different from the standard one.
Add a jqChart container
Add a container (target) to your web page where you want your chart to show up. Be sure to give your target a width and a height:
<div id="jqChart" style="width: 500px; height: 300px;"></div>
Create a chart
Then, create the actual chart by calling the jqChart plugin with the id of your target and some data:
$('#jqChart').jqChart({
title: { text: 'Chart Title' },
series: [
{
type: 'column',
title: 'Column',
data: [62, 70, 68, 58, 52, 60, 48]
}
]
});
Which will produce a chart like:
Summary
That’s all. We created a basic chart using only HTML and JavaScript.
Official Site | Samples | Download | Documentation | Forum | Twitter