Animating a gauge meter (jqPlot)
In this recipe, we will be creating a really fun gauge meter and injecting some random animation into it to make it look like a real source of live data is connected to it, such as the speed of a car:
Getting ready
To get started you will need to use jQuery and jqPlot. This time around we will start from scratch.
To get the latest scripts, visit the creator site at http://blog.everythingfla.com/?p=339.
Download both jQuery and jqPlot, or download our source files to start with.
How to do it...
Let's list the steps required to complete the task:
Create an HTML page for our project:
<!DOCTYPE html> <html> <head> <title>JQPlot Meter</title> <meta charset="utf-8" /> <link rel="stylesheet" href="./external/jqplot/jquery.jqplot.min.css"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script src="./external/jqplot/jquery.jqplot.js"></script>...