Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A jQuery plugin for displaying graphite graphs
branch: master

Merge pull request #6 from davis/patch-1

Fix README link to render api docs.
Failed to load latest commit information.
LICENSE Initial commit. Fix link to Render URL API.
jquery.graphite.js Don't modify geturl() argument; fixes timestamps.


Plugin to easily make graphs and update them on the fly using Graphite's Render Url API.

How it works

One. Adding a graph to a page:

<img id="graph">
    from: "-24hours",
    target: [

Two. Setting custom options:

<img id="graph">
    from: "-24hours",
    colorList: "red,green",
    target: [
        "alias(summarize(stats.site1.auth.login.error,'30min'),'Login Errors')",
        "alias(summarize(stats.site1.auth.login.user,'30min'),'Login Success')"
    title: "Login errors vs Success"

Three. Setting global defaults:

$.fn.graphite.defaults.width = "450"
$.fn.graphite.defaults.height = "300"

Four. Updating existing graph:

$.fn.graphite.update($("#graph"), {from: "-3days", lineWidth: "2"});

Five. Setting a custom api url--the default is "/render/":

$.fn.graphite.defaults.url = "http://myserver/render/"


    url: "http://myserver/render/"


You should probably specify a target. All other settings are optional. All settings will be passed through to the graphite api.

Something went wrong with that request. Please try again.