Version 5 (modified by Pablo, 5 years ago) (diff)


JQPlot Chart Macro


This macro adds JQplot based charts to Trac pages:

Bugs/Feature Requests

Existing bugs and feature requests for JqChartMacro are here.

If you have any issues, create a new ticket.


Download the zipped source from [download:jqchartmacro here].


You can check out JqChartMacro from here using Subversion, or browse the source with Trac.


Make sure that jqplotchart is enabled in trac.ini:

jqplotchart.* = enabled


This creates a gauge counting the number of rows returned in report number 10.

  "type": "MeterGauge",
  "report_id": 10,
  "options" : {
    "seriesDefaults": {
      "rendererOptions": {
        "label": "# bugs",
        "intervals": [4, 8, 12]

This creates a line chart with one series per ticket type. The x axis is the time the ticket was created, and the y axis is a 'cooked' number for demonstration only (the ticket id times 10). Notice that the sql query returns the ticket id. This will make each point in the chart clickable. When you click on a point, you will be sent to the ticket corresponding to that point.

  "width": 400,
  "height": 250,
  "query": "select type, time, id * 10, id from ticket order by time",
  "options" : {
    "title": "Creation date of each ticket, by type"
  "series_column": "type"

The options element is the jqplot options parameter. See jqplot for more information.

Recent Changes

13308 by gpablo on 2013-06-28 15:28:18
Support report numbers over 9 in subqueries.
13298 by gpablo on 2013-06-19 01:38:16
Support charts inside wiki processors.
13064 by gpablo on 2013-05-09 04:09:19
Extend the interval color if the gauge value is larger than the upper limit.


Author: gpablo
Maintainer: gpablo

Attachments (4)

Download all attachments as: .zip