Hit enter after type your search item

4 Demos of jQuery Circle Statistics/Chart based on SVG (no images)

The jquery-plugin-circliful for creating circle data presentation

The circliful enables creating the SVG based circles for statistical information on web pages. It uses font-awesome icons that allow adding icons to make statistical circles even more descriptive.

No images are used, so it is light weight with many options that can be set by using jQuery or data attributes. The circular data representation is fully responsive so it adapts to the user’s screen.

Demo 1 Demo 2 Demo 3
Developer’s page Download plug-in

Setting up circliful plug-in

Include the CSS and JS files of the plug-in; CSS in the <head> section:

<link rel=”stylesheet” href=”css/circliful/jquery.circliful.css”>

The JS file before the </body> tag and below the jQuery file:

<script src=”js/circliful/jquery.circliful.js”></script>

Using markup

The markup is just a container like a div element where statistic circle will appear with a unique ID, for example:


 

Call the plug-in

By using the unique ID of the element containing the circle, initiate the plug-in with options:


 

See the section below for demos and code with various options.

A demo of simple circle with a few options

The demo below shows a simple usage of the circliful plug-in. A few options (among many) are used to specify the circle. The animation option specifies whether to load the circle with animation or initially filled.

Specify the circle inner and out border widths by using the foregroundBorderWidth and backgroundBorderWidth options. The percent option is for specifying the percentage of the circle to be filled and you may also set the text properties for showing percentage:

jQuery circle stats

See online demo and code

The markup:


 

The script:


 

A demo of using font-awesome icon in circle graph

The following options deal with the icons inside the circle:

  • icon:  //Specify the icon code
  • iconColor //icon color like hexadecimal value
  • iconSize //An integer value for specifying the size of the icon
  • iconPosition: //Set the position of icon. You may set top, middle, right, left and bottom

Have a look:

jQuery circle graph

See online demo and code

The code:


 

You can see, the wifi icon is used which code is “f1eb”. You can see the list of codes for font-awesome icons here.

A demo of caption and icon with text

In this demo, the icon is displayed along with the percentage inside the circle graph. Towards the outer side, the caption is also displayed that can be in the context of the statistical circle:

jQuery circle caption

See online demo and code

The jQuery code:


 

You saw the downloading icon is used from the font-awesome library while the caption is used as “Downloading”. Inside the circle, the position of the icon is set as bottom while the percentage is also displayed.

You may also use the data attributes rather than using the JavaScript for creating the circle graphs. For example, data-icon=”f019″, data-animationStep=”10″ etc.. Just add the “data-“ prefix with the option. See an example below.

An example of data attributes for creating the circle

Almost the same circle is created as in above example but this time using the data attributes. The following data attributes are used:

  • data-animation
  • data-animationStep
  • data-icon
  • data-target
  • data-percent
  • data-showPercent
  • data-backgroundColor
  • data-foregroundColor
  • data-fontColor
  • data-iconColor
  • data-iconSize
  • data-iconPosition
  • data-multiPercentage
  • data-text

Have a look:

jQuery circle data attributes

See online demo and code

The markup for this example:


 

You can see, only the plug-in is initiated by using the jQuery code while all options are set by using the data attributes.

For the full available list of options, go to the plug-in’s developer page.

This div height required for enabling the sticky sidebar