|
1 | 1 | { |
2 | 2 | /** |
3 | | - * Returns a new graph panel that can be added in a row. |
| 3 | + * Creates a [graph panel](https://grafana.com/docs/grafana/latest/panels/visualizations/graph-panel/). |
4 | 4 | * It requires the graph panel plugin in grafana, which is built-in. |
5 | 5 | * |
6 | 6 | * @name graphPanel.new |
7 | 7 | * |
8 | 8 | * @param title The title of the graph panel. |
9 | | - * @param span Width of the panel |
10 | | - * @param datasource Datasource |
11 | | - * @param fill Fill, integer from 0 to 10 |
12 | | - * @param linewidth Line Width, integer from 0 to 10 |
13 | | - * @param decimals Override automatic decimal precision for legend and tooltip. If null, not added to the json output. |
14 | | - * @param decimalsY1 Override automatic decimal precision for the first Y axis. If null, use decimals parameter. |
15 | | - * @param decimalsY2 Override automatic decimal precision for the second Y axis. If null, use decimals parameter. |
16 | | - * @param min_span Min span |
17 | | - * @param format Unit of the Y axes |
18 | | - * @param formatY1 Unit of the first Y axis |
19 | | - * @param formatY2 Unit of the second Y axis |
20 | | - * @param min Min of the Y axes |
21 | | - * @param max Max of the Y axes |
22 | | - * @param labelY1 Label of the first Y axis |
23 | | - * @param labelY2 Label of the second Y axis |
24 | | - * @param x_axis_mode X axis mode, one of [time, series, histogram] |
25 | | - * @param x_axis_values Chosen value of series, one of [avg, min, max, total, count] |
26 | | - * @param x_axis_buckets restricts the x axis to this amount of buckets |
27 | | - * @param x_axis_min restricts the x axis to display from this value if supplied |
28 | | - * @param x_axis_max restricts the x axis to display up to this value if supplied |
29 | | - * @param lines Display lines, boolean |
30 | | - * @param points Display points, boolean |
31 | | - * @param pointradius Radius of the points, allowed values are 0.5 or [1 ... 10] with step 1 |
32 | | - * @param bars Display bars, boolean |
33 | | - * @param staircase Display line as staircase, boolean |
34 | | - * @param dashes Display line as dashes |
35 | | - * @param stack Stack values |
36 | | - * @param repeat Variable used to repeat the graph panel |
37 | | - * @param legend_show Show legend |
38 | | - * @param legend_values Show values in legend |
39 | | - * @param legend_min Show min in legend |
40 | | - * @param legend_max Show max in legend |
41 | | - * @param legend_current Show current in legend |
42 | | - * @param legend_total Show total in legend |
43 | | - * @param legend_avg Show average in legend |
44 | | - * @param legend_alignAsTable Show legend as table |
45 | | - * @param legend_rightSide Show legend to the right |
46 | | - * @param legend_sideWidth Legend width |
47 | | - * @param legend_sort Sort order of legend |
48 | | - * @param legend_sortDesc Sort legend descending |
49 | | - * @param aliasColors Define color mappings for graphs |
50 | | - * @param thresholds Configuration of graph thresholds |
51 | | - * @param logBase1Y Value of logarithm base of the first Y axis |
52 | | - * @param logBase2Y Value of logarithm base of the second Y axis |
53 | | - * @param transparent Boolean (default: false) If set to true the panel will be transparent |
54 | | - * @param value_type Type of tooltip value |
55 | | - * @param shared_tooltip Boolean Allow to group or spit tooltips on mouseover within a chart |
56 | | - * @param percentage Boolean (defaut: false) show as percentages |
57 | | - * @return A json that represents a graph panel |
| 9 | + * @param description (optional) The description of the panel |
| 10 | + * @param span (optional) Width of the panel |
| 11 | + * @param datasource (optional) Datasource |
| 12 | + * @param fill (default `1`) , integer from 0 to 10 |
| 13 | + * @param linewidth (default `1`) Line Width, integer from 0 to 10 |
| 14 | + * @param decimals (optional) Override automatic decimal precision for legend and tooltip. If null, not added to the json output. |
| 15 | + * @param decimalsY1 (optional) Override automatic decimal precision for the first Y axis. If null, use decimals parameter. |
| 16 | + * @param decimalsY2 (optional) Override automatic decimal precision for the second Y axis. If null, use decimals parameter. |
| 17 | + * @param min_span (optional) Min span |
| 18 | + * @param format (default `short`) Unit of the Y axes |
| 19 | + * @param formatY1 (optional) Unit of the first Y axis |
| 20 | + * @param formatY2 (optional) Unit of the second Y axis |
| 21 | + * @param min (optional) Min of the Y axes |
| 22 | + * @param max (optional) Max of the Y axes |
| 23 | + * @param labelY1 (optional) Label of the first Y axis |
| 24 | + * @param labelY2 (optional) Label of the second Y axis |
| 25 | + * @param x_axis_mode (default `'time'`) X axis mode, one of [time, series, histogram] |
| 26 | + * @param x_axis_values (default `'total'`) Chosen value of series, one of [avg, min, max, total, count] |
| 27 | + * @param x_axis_buckets (optional) Restricts the x axis to this amount of buckets |
| 28 | + * @param x_axis_min (optional) Restricts the x axis to display from this value if supplied |
| 29 | + * @param x_axis_max (optional) Restricts the x axis to display up to this value if supplied |
| 30 | + * @param lines (default `true`) Display lines |
| 31 | + * @param points (default `false`) Display points |
| 32 | + * @param pointradius (default `5`) Radius of the points, allowed values are 0.5 or [1 ... 10] with step 1 |
| 33 | + * @param bars (default `false`) Display bars |
| 34 | + * @param staircase (default `false`) Display line as staircase |
| 35 | + * @param dashes (default `false`) Display line as dashes |
| 36 | + * @param stack (default `false`) Whether to stack values |
| 37 | + * @param repeat (optional) Name of variable that should be used to repeat this panel. |
| 38 | + * @param repeatDirection (default `'h'`) 'h' for horizontal or 'v' for vertical. |
| 39 | + * @param legend_show (default `true`) Show legend |
| 40 | + * @param legend_values (default `false`) Show values in legend |
| 41 | + * @param legend_min (default `false`) Show min in legend |
| 42 | + * @param legend_max (default `false`) Show max in legend |
| 43 | + * @param legend_current (default `false`) Show current in legend |
| 44 | + * @param legend_total (default `false`) Show total in legend |
| 45 | + * @param legend_avg (default `false`) Show average in legend |
| 46 | + * @param legend_alignAsTable (default `false`) Show legend as table |
| 47 | + * @param legend_rightSide (default `false`) Show legend to the right |
| 48 | + * @param legend_sideWidth (optional) Legend width |
| 49 | + * @param legend_sort (optional) Sort order of legend |
| 50 | + * @param legend_sortDesc (optional) Sort legend descending |
| 51 | + * @param aliasColors (optional) Define color mappings for graphs |
| 52 | + * @param thresholds (optional) An array of graph thresholds |
| 53 | + * @param logBase1Y (default `1`) Value of logarithm base of the first Y axis |
| 54 | + * @param logBase2Y (default `1`) Value of logarithm base of the second Y axis |
| 55 | + * @param transparent (default `false`) Whether to display the panel without a background. |
| 56 | + * @param value_type (default `'individual'`) Type of tooltip value |
| 57 | + * @param shared_tooltip (default `true`) Allow to group or spit tooltips on mouseover within a chart |
| 58 | + * @param percentage (defaut: false) show as percentages |
| 59 | + * |
| 60 | + * @method addTarget(target) Adds a target object. |
| 61 | + * @method addTargets(targets) Adds an array of targets. |
| 62 | + * @method addSeriesOverride(override) |
| 63 | + * @method addYaxis(format,min,max,label,show,logBase,decimals) Adds a Y axis to the graph |
| 64 | + * @method addAlert(alert) Adds an alert |
| 65 | + * @method addLink(link) Adds a [panel link](https://grafana.com/docs/grafana/latest/linking/panel-links/) |
58 | 66 | */ |
59 | 67 | new( |
60 | 68 | title, |
|
0 commit comments