com.atlassian.jira.charts
Class DefaultChartFactory

java.lang.Object
  extended by com.atlassian.jira.charts.DefaultChartFactory
All Implemented Interfaces:
ChartFactory

public class DefaultChartFactory
extends Object
implements ChartFactory

Since:
v4.0

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.charts.ChartFactory
ChartFactory.ChartContext, ChartFactory.PeriodName, ChartFactory.VersionLabel
 
Field Summary
 
Fields inherited from interface com.atlassian.jira.charts.ChartFactory
FRAGMENT_IMAGE_HEIGHT, FRAGMENT_IMAGE_WIDTH, PORTLET_IMAGE_HEIGHT, PORTLET_IMAGE_WIDTH, REPORT_IMAGE_HEIGHT, REPORT_IMAGE_WIDTH
 
Constructor Summary
DefaultChartFactory(SearchProvider searchProvider, VersionManager versionManager, IssueIndexManager issueIndexManager, IssueSearcherManager issueSearcherManager, ConstantsManager constantsManager, CustomFieldManager customFieldManager, FieldManager fieldManager, SearchService searchService, ApplicationProperties applicationProperties, ProjectManager projectManager, TimeZoneManager timeZoneManager)
           
 
Method Summary
 Chart generateAverageAgeChart(ChartFactory.ChartContext context, int days, ChartFactory.PeriodName periodName)
          Generates what is essentially a bar chart showing the average time that issues have been open for over time.
 Chart generateCreatedVsResolvedChart(ChartFactory.ChartContext context, int days, ChartFactory.PeriodName periodName, ChartFactory.VersionLabel versionLabel, boolean cumulative, boolean showUnresolvedTrend)
          Generates a created vs resolved line graph, showing the difference between created and resolved issues.
 Chart generateDateRangeTimeChart(ChartFactory.ChartContext context, int days, ChartFactory.PeriodName periodName, long yAxisTimePeriod, String labelSuffixKey, String dateFieldId)
          Generates a date range chart time, meaning a chart that shows time values for particular date ranges.
 Chart generatePieChart(ChartFactory.ChartContext context, String statisticType)
          Generates a pie chart for a particular field.
 Chart generateRecentlyCreated(ChartFactory.ChartContext context, int days, ChartFactory.PeriodName periodName)
          Generates a stacked bar chart showing the number of created/resolved issues for a certain time period.
 Chart generateTimeSinceChart(ChartFactory.ChartContext context, int days, ChartFactory.PeriodName periodName, boolean cumulative, String dateFieldId)
          Generates a chart showing the number of issues since a certain date field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultChartFactory

public DefaultChartFactory(SearchProvider searchProvider,
                           VersionManager versionManager,
                           IssueIndexManager issueIndexManager,
                           IssueSearcherManager issueSearcherManager,
                           ConstantsManager constantsManager,
                           CustomFieldManager customFieldManager,
                           FieldManager fieldManager,
                           SearchService searchService,
                           ApplicationProperties applicationProperties,
                           ProjectManager projectManager,
                           TimeZoneManager timeZoneManager)
Method Detail

generateCreatedVsResolvedChart

public Chart generateCreatedVsResolvedChart(ChartFactory.ChartContext context,
                                            int days,
                                            ChartFactory.PeriodName periodName,
                                            ChartFactory.VersionLabel versionLabel,
                                            boolean cumulative,
                                            boolean showUnresolvedTrend)
Description copied from interface: ChartFactory
Generates a created vs resolved line graph, showing the difference between created and resolved issues.

Specified by:
generateCreatedVsResolvedChart in interface ChartFactory
Parameters:
context - Basic information needed to generate all charts
days - Number of days to go back in time for the chart
periodName - Defines if the data will be grouped in days, weeks, months...
versionLabel - Defines what version labels to show in the chart
cumulative - Display cumulative totals for the resolved and unresolved issues
showUnresolvedTrend - Displays a subgraph showing the trend at which issues are being resolved
Returns:
A chart object containing all the information required to display the chart.

generateDateRangeTimeChart

public Chart generateDateRangeTimeChart(ChartFactory.ChartContext context,
                                        int days,
                                        ChartFactory.PeriodName periodName,
                                        long yAxisTimePeriod,
                                        String labelSuffixKey,
                                        String dateFieldId)
Description copied from interface: ChartFactory
Generates a date range chart time, meaning a chart that shows time values for particular date ranges. For example the total resolution time for issues in any given time period.

Specified by:
generateDateRangeTimeChart in interface ChartFactory
Parameters:
context - Basic information needed to generate all charts
days - Number of days to go back in time for the chart
periodName - Defines if the data will be grouped in days, weeks, months...
yAxisTimePeriod - Time period in millis to display on the yAxis. Only supports Hours and Days
labelSuffixKey - The i18n suffix key to display for mouse tool tips in the chart
dateFieldId - The date field to use as the basis for the times displayed per date range
Returns:
A chart object containing all the information required to display the chart.

generatePieChart

public Chart generatePieChart(ChartFactory.ChartContext context,
                              String statisticType)
Description copied from interface: ChartFactory
Generates a pie chart for a particular field. For example, this may generate a pie chart showing how many issues are in each issue type available. See FilterStatisticsValuesGenerator for possible values for the statisticType. Custom fields are also supported by simply entering the 'customfield_' for the statisticType.

Specified by:
generatePieChart in interface ChartFactory
Parameters:
context - Basic information needed to generate all charts
statisticType - The field for which to generate the pie slices.
Returns:
A chart object containing all the information required to display the chart.

generateAverageAgeChart

public Chart generateAverageAgeChart(ChartFactory.ChartContext context,
                                     int days,
                                     ChartFactory.PeriodName periodName)
Description copied from interface: ChartFactory
Generates what is essentially a bar chart showing the average time that issues have been open for over time.

Specified by:
generateAverageAgeChart in interface ChartFactory
Parameters:
context - Basic information needed to generate all charts
days - Number of days to go back in time for the chart
periodName - Defines if the data will be grouped in days, weeks, months...
Returns:
A chart object containing all the information required to display the chart.

generateRecentlyCreated

public Chart generateRecentlyCreated(ChartFactory.ChartContext context,
                                     int days,
                                     ChartFactory.PeriodName periodName)
Description copied from interface: ChartFactory
Generates a stacked bar chart showing the number of created/resolved issues for a certain time period.

Specified by:
generateRecentlyCreated in interface ChartFactory
Parameters:
context - Basic information needed to generate all charts
days - Number of days to go back in time for the chart
periodName - Defines if the data will be grouped in days, weeks, months...
Returns:
A chart object containing all the information required to display the chart.

generateTimeSinceChart

public Chart generateTimeSinceChart(ChartFactory.ChartContext context,
                                    int days,
                                    ChartFactory.PeriodName periodName,
                                    boolean cumulative,
                                    String dateFieldId)
Description copied from interface: ChartFactory
Generates a chart showing the number of issues since a certain date field. For example if the 'Created' field is selected, this chart will show the number of issues created for each date in the past (depending on period and days previously selected). Please note that the dateField must be a Field marked by DateField.

Specified by:
generateTimeSinceChart in interface ChartFactory
Parameters:
context - Basic information needed to generate all charts
days - Number of days to go back in time for the chart
periodName - Defines if the data will be grouped in days, weeks, months...
cumulative - Display cumulative totals for the number of issues
dateFieldId - The date field to use as the basis for the times displayed per date range
Returns:
A chart object containing all the information required to display the chart.


Copyright © 2002-2012 Atlassian. All Rights Reserved.