[[PageOutline(2-5,Contents,pullout)]] = Display ticket statistics charts {{{#!box warn **Notice:** This plugin is deprecated since depends on Flash, support for which is being removed from all major browsers. }}} == Description This macro allows the creation of charts on ticket statistics. It uses [https://sourceforge.net/projects/openflashchart/ Open Flash Charts], which itself is no longer maintained and LGPLv2 licensed. The chart types supported are: * Pie charts. * Bar charts. * Stacked bar charts. The charts are configured by the parameters that you pass to the macro. See the examples below. All charts are clickable and will link to the ticket query page of the graph. See also TracTicketStatsPlugin, TracMetrixPlugin. == Bugs/Feature Requests Existing bugs and feature requests for TicketChartsMacro are [report:9?COMPONENT=TicketChartsMacro here]. If you have any issues, create a [/newticket?component=TicketChartsMacro new ticket]. [[TicketQuery(component=TicketChartsMacro&group=type,format=progress)]] == Download Download the zipped source from [export:ticketchartsmacro here]. == Source You can check out TicketChartsMacro from [/svn/ticketchartsmacro here] using Subversion, or [source:ticketchartsmacro browse the source] with Trac. == Installation 1. Download the source. 1. Copy the file !TicketCharts.py to your project's plugins directory or to the global plugins directory, which is usually `/usr/share/trac/plugins`. 1. Enable !TicketCharts plugin via the WebAdmin interface or by adding the following lines to the [components] section of your `trac.ini` file: {{{#!ini [components] ticketcharts.* = enabled }}} == Configuration The following configuration can appear in `trac.ini` (default values are shown): {{{#!ini [ticket-charts] height = 300 width = 500 }}} The arguments are: * Arguments for all types of graphs: * '''type''' - The type of the graph. Can be `pie`, `bars` or `stacked_bars`. * '''height''', '''width''' - The height and width of the graph, in pixels. Percentages will not work. If not specified, the values from trac.ini are taken, and if those aren't specified, then other default values are used. * '''title''' - Text that will be displayed on the top of the chart. * '''query''' - A Trac Query. All the stats will be taken from this query. Examples: {{{ query = milestone=my_milestone&owner=aviram|danny }}} * '''factor''' - The name of the field by which the stats will be formed. * Arguments for '''bar''' graphs: * '''x_axis''' - The name of the field by which the stats will be formed (The X Axis values). * Arguments for '''stacked bars''' graphs: * '''x_axis''' - The name of the field by which the stats will be formed (The X Axis values). * '''key''' - The name of the field by which the chart's columns are divided. == Examples with Snapshots '''Number of tickets per milestone''': {{{ [[TicketChart(type = pie, factor = milestone)]] }}} [[Image(pie_by_milestone.png, border=2)]] '''Number of tickets per status for milestone4''': {{{ [[TicketChart(type = pie, factor = status, query = milestone=milestone4)]] }}} [[Image(pie_by_status.png, border=2)]] '''Number of tickets by status and owners''': {{{ [[TicketChart(type = stacked_bars, key = owner, x_axis = status, height = 400, width = 600)]] }}} [[Image(stacked_bars.png, border=2)]] '''Number of tickets by status and owner for milestone1''': {{{ [[TicketChart(type = stacked_bars, key = owner, x_axis = status, query = milestone=milestone1, title = Tickets by status and owner for milestone1)]] }}} [[Image(stacked_bars_for_milestone1.png, border=2)]] '''Number of tickets by owner and type''': {{{ [[TicketChart(type = stacked_bars, key = type, x_axis = owner)]] }}} [[Image(stacked_bars_2.png, border=2)]] '''Number of tickets by status for milestone4''': {{{ [[TicketChart(type = bars, x_axis = status, query = milestone=milestone4, title = Tickets by status for milestone4)]] }}} [[Image(bars_for_milestone4.png, border=2)]] == Recent Changes [[ChangeLog(ticketchartsmacro, 3)]] == Author/Contributors '''Author:''' [wiki:aviram] [[BR]] '''Maintainer:''' [[Maintainer]] [[BR]] '''Contributors:'''