jQuery flot stacked bar chart example
Flot is a Javascript plotting library for jQuery. Here are my steps to create a simplified version of the stacked bar chart example from the flot examples page. For more information, see the API documentation.
- Download and unpack:
cd ~/src/jquery/flot_examples curl http://flot.googlecode.com/files/flot-0.6.tar.gz | tar xzf -
~/src/jquery/flot_examples/stacked_bar_ex.html:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!--[if IE]><script language="javascript" type="text/javascript" src="flot/excanvas.min.js"></script ...
Emacs espresso-mode for jQuery
Because js2-mode (20090723b) indents jQuery like this:
$(document).ready(function() {
$("a").click(function() {
alert("Hello World");
});
});
instead of this:
$(document).ready(function() {
$("a").click(function() {
alert("Hello World");
});
});
I've switched to espresso-mode. Here's my install notes:
- Download
$ cd ~/.emacs.d/site-lisp $ wget http://download.savannah.gnu.org/releases-noredirect/espresso/espresso.el
- Edit your
.emacs:(add-to-list 'load-path "~/.emacs.d/site-lisp") (autoload #'espresso-mode "espresso" "Start espresso-mode" t) (add-to-list 'auto-mode-alist '("\\.js$" . espresso-mode)) (add-to-list 'auto-mode-alist '("\\.json$" . espresso-mode)) - Start emacs and byte-compile espresso.el:
M-x byte-compile-file RET ~/.emacs.d/site-lisp/espresso.el
Side note: I just realized it is "espresso-mode" and not "expresso-mode".
... read more »Google jQuery hosting (very short version)
Via this article, use the Google-hosted jQuery instead of serving it yourself:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
Here's the info from Google.
... read more »About
I'm Eliot and this is my notepad for programming topics such as Python, Django, Ubuntu, Emacs, etc... more »
Search Blog
Tags
-
algorithms
(5)
-
aws
(9)
-
blogproject
(20)
-
c_cplusplus
(12)
-
cardstore
(8)
-
colinux
(2)
-
concurrency
(13)
-
conkeror
(2)
-
core
(2)
-
cygwin
(17)
-
datastructures
(14)
-
datetime
(4)
-
decorators
(4)
-
django
(40)
-
emacs
(22)
-
files_directories
(11)
-
git
(5)
-
hardware
(5)
-
install_setup
(8)
-
javascript
(3)
-
keyboard
(9)
-
matplotlib
(5)
-
mercurial
(4)
-
nginx
(2)
-
persistence
(5)
-
preferences
(7)
-
processes
(4)
-
pyqt
(18)
-
python
(144)
-
ratpoison
(3)
-
regexes
(6)
-
rsync
(3)
-
softwaretools
(17)
-
sql
(14)
-
ssh
(10)
-
subversion
(6)
-
twisted
(7)
-
ubuntu
(65)
-
urxvt
(5)
-
vxworks
(25)
-
webdev
(5)
-
wmii
(7)
Blogroll
- Adam Gomaa
- Alex Clemesha
- Amir Salihefendic
- Armin Ronacher
- David Beazley
- David Ziegler
- Duncan McGreggor
- Gareth Rushgrave
- Glyph Lefkowitz
- Guido van Rossum
- Ian Bicking
- Jacob Kaplan-Moss
- James Bennett
- James Tauber
- Jesper Noehr
- Marty Alchin
- Matt Harrison
- Nikolay Kolev
- Parand Darugar
- Peter Baumgartner
- Peter Bengtsson
- Rob Hudson
- Simon Willison
- Will McGugan