On this page |
The Chart data scripts screen lists all available scripts, providing the following information: |
Property | Function |
---|---|
Name | The name of the script |
Layout | The Javascript layout used by the script |
Author | The creator of the script |
Created | The timestamp of script creation |
Updated | The timestamp of the last update |
Operations | Available operations for each script:
|
On the Chart Data Scripts page, click on "edit" under the actions column to edit a saved configuration.
In the General section you can edit the Name and the Description of your template. Also you can preview the chart. |
|
In order to provide maximum flexibility and usability of charts, xCharts allows creation of parameters for a scripted chart. Parameters are variables used in the scripted chart, which at chart render time provide certain Jira specific (user/group/project/date picker) fields or custom (chart type picker, text) fields.
There are multiple types of parameters, and we also plan on adding new types as we release new versions. For a complete reference on parameters, and the versions they were introduced in, see Script Parameters. Available types include:
|
The script section is where your actual chart logic written in Groovy goes. There are two ways to achieve it:
Click Save in order to save or update the script. Click Cancel to get back to the Chart Data Scripts screen. |
In order to be able to use resources from the file system (Groovy scripts for charts, Javascript resources, CSS resources), one needs to create inside the JIRA_HOME directory a folder called xcharts, where all these files must be saved in order to be found by xCharts. There is no Jira restart needed for this action. Once copied there, the resources will be available when scripting charts, like the following:
|
Context variables can be used in the Groovy Script without declaring them, because they are available at run-time, and they can be called by name. By default in xCharts, you have access to some context variables:
|
You have the possibility to visualize modifications done to a scripted chart before saving.
|