Changes between Version 1 and Version 2 of TracYetAnotherChartMacro


Ignore:
Timestamp:
May 13, 2018, 7:07:41 PM (6 years ago)
Author:
Theodor Norup
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracYetAnotherChartMacro

    v1 v2  
    3535General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page.
    3636
     37== Usage
     38
     39{{{
     40[[yachart(id=first; title=Action statuses; query=SELECT status, COUNT(status) FROM ticket where type = 'Action' GROUP BY status)]]
     41}}}
     42...will result in something like this:
     43[[Image(newplot(1).png, width=300)]]
     44
     45=== Parameters
     46
     47Note the unusual use of semicolon as delimiter character - this is chosen in order to avoid escaping commas in the SQL query
     48
     49{{{#!ini
     50id         = dom-name # The name of the HTML DOM carrying the chart. Mandatory. Must be unique for each macro call on a wiki page
     51title      = title-text # The headline shown above the chart. Default: blank.
     52chart_type = bar|line|pie # Optional; default: bar
     53query      = sql-query # Mandatory
     54width      = pixel-width # Optional; default: 600 pixels
     55height     = pixel-height # optional: default: 400 pixels
     56}}}
     57
     58In the query, the macro will replace the string `$USER` with the id of the user logged in. This can be used to display "my tickets":
     59
     60
     61
    3762== Recent Changes
    3863