Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Commit

Permalink
Add fillGradient param to graphPanel
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Fontan committed Oct 13, 2020
1 parent ff69572 commit 7ba2afd
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/jvm_compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@
"datasource": "-- Mixed --",
"decimals": 2,
"fill": 0,
"fillGradient": 0,
"gridPos": { },
"id": 6,
"legend": {
Expand Down Expand Up @@ -541,6 +542,7 @@
"datasource": "-- Mixed --",
"decimals": 2,
"fill": 0,
"fillGradient": 0,
"gridPos": { },
"id": 7,
"legend": {
Expand Down Expand Up @@ -655,6 +657,7 @@
"datasource": "-- Mixed --",
"decimals": 2,
"fill": 0,
"fillGradient": 0,
"gridPos": { },
"id": 8,
"legend": {
Expand Down Expand Up @@ -770,6 +773,7 @@
"datasource": "-- Mixed --",
"decimals": 2,
"fill": 0,
"fillGradient": 0,
"gridPos": { },
"id": 9,
"legend": {
Expand Down Expand Up @@ -855,6 +859,7 @@
"datasource": "-- Mixed --",
"decimals": 2,
"fill": 0,
"fillGradient": 0,
"gridPos": { },
"id": 10,
"legend": {
Expand Down Expand Up @@ -954,6 +959,7 @@
"datasource": "-- Mixed --",
"decimals": 2,
"fill": 0,
"fillGradient": 0,
"gridPos": { },
"id": 11,
"legend": {
Expand Down Expand Up @@ -1071,6 +1077,7 @@
"datasource": "-- Mixed --",
"decimals": 2,
"fill": 0,
"fillGradient": 0,
"gridPos": { },
"id": 12,
"legend": {
Expand Down
4 changes: 4 additions & 0 deletions examples/k8s_cluster_summary_compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,7 @@
"dashes": false,
"datasource": "$datasource",
"fill": 1,
"fillGradient": 0,
"gridPos": { },
"id": 10,
"legend": {
Expand Down Expand Up @@ -780,6 +781,7 @@
"dashes": false,
"datasource": "$datasource",
"fill": 1,
"fillGradient": 0,
"gridPos": { },
"id": 11,
"legend": {
Expand Down Expand Up @@ -874,6 +876,7 @@
"dashes": false,
"datasource": "$datasource",
"fill": 1,
"fillGradient": 0,
"gridPos": { },
"id": 12,
"legend": {
Expand Down Expand Up @@ -968,6 +971,7 @@
"dashes": false,
"datasource": "$datasource",
"fill": 1,
"fillGradient": 0,
"gridPos": { },
"id": 13,
"legend": {
Expand Down
1 change: 1 addition & 0 deletions examples/prometheus_compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"dashes": false,
"datasource": "Prometheus",
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 7,
Expand Down
3 changes: 3 additions & 0 deletions grafonnet/graph_panel.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* @param span (optional) Width of the panel
* @param datasource (optional) Datasource
* @param fill (default `1`) , integer from 0 to 10
* @param fillGradient (default `0`) , integer from 0 to 10
* @param linewidth (default `1`) Line Width, integer from 0 to 10
* @param decimals (optional) Override automatic decimal precision for legend and tooltip. If null, not added to the json output.
* @param decimalsY1 (optional) Override automatic decimal precision for the first Y axis. If null, use decimals parameter.
Expand Down Expand Up @@ -68,6 +69,7 @@
title,
span=null,
fill=1,
fillGradient=0,
linewidth=1,
decimals=null,
decimalsY1=null,
Expand Down Expand Up @@ -166,6 +168,7 @@
},
lines: lines,
fill: fill,
fillGradient: fillGradient,
linewidth: linewidth,
dashes: dashes,
dashLength: 10,
Expand Down
1 change: 1 addition & 0 deletions tests/graph_panel/test.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ local graphPanel = grafana.graphPanel;
labelY2='labelY2',
lines=false,
fill=2,
fillGradient=1,
linewidth=2,
nullPointMode='nullAsZero',
points=true,
Expand Down
13 changes: 13 additions & 0 deletions tests/graph_panel/test_compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"decimals": 2,
"description": "description",
"fill": 2,
"fillGradient": 1,
"height": "2011px",
"legend": {
"alignAsTable": true,
Expand Down Expand Up @@ -114,6 +115,7 @@
"dashes": false,
"datasource": null,
"fill": 1,
"fillGradient": 0,
"legend": {
"alignAsTable": false,
"avg": false,
Expand Down Expand Up @@ -203,6 +205,7 @@
"dashes": false,
"datasource": null,
"fill": 1,
"fillGradient": 0,
"legend": {
"alignAsTable": false,
"avg": false,
Expand Down Expand Up @@ -277,6 +280,7 @@
"dashes": false,
"datasource": null,
"fill": 1,
"fillGradient": 0,
"legend": {
"alignAsTable": false,
"avg": false,
Expand Down Expand Up @@ -348,6 +352,7 @@
"datasource": null,
"decimals": 2,
"fill": 1,
"fillGradient": 0,
"legend": {
"alignAsTable": false,
"avg": false,
Expand Down Expand Up @@ -419,6 +424,7 @@
"dashes": false,
"datasource": null,
"fill": 1,
"fillGradient": 0,
"legend": {
"alignAsTable": false,
"avg": false,
Expand Down Expand Up @@ -489,6 +495,7 @@
"dashes": false,
"datasource": null,
"fill": 1,
"fillGradient": 0,
"legend": {
"alignAsTable": false,
"avg": false,
Expand Down Expand Up @@ -561,6 +568,7 @@
"dashes": false,
"datasource": null,
"fill": 1,
"fillGradient": 0,
"legend": {
"alignAsTable": false,
"avg": false,
Expand Down Expand Up @@ -633,6 +641,7 @@
"dashes": false,
"datasource": null,
"fill": 1,
"fillGradient": 0,
"legend": {
"alignAsTable": false,
"avg": false,
Expand Down Expand Up @@ -706,6 +715,7 @@
"dashes": false,
"datasource": null,
"fill": 1,
"fillGradient": 0,
"legend": {
"alignAsTable": false,
"avg": false,
Expand Down Expand Up @@ -785,6 +795,7 @@
"dashes": false,
"datasource": null,
"fill": 1,
"fillGradient": 0,
"legend": {
"alignAsTable": true,
"avg": false,
Expand Down Expand Up @@ -857,6 +868,7 @@
"dashes": false,
"datasource": null,
"fill": 1,
"fillGradient": 0,
"legend": {
"alignAsTable": false,
"avg": false,
Expand Down Expand Up @@ -926,6 +938,7 @@
"dashes": false,
"datasource": null,
"fill": 1,
"fillGradient": 0,
"legend": {
"alignAsTable": false,
"avg": false,
Expand Down

0 comments on commit 7ba2afd

Please sign in to comment.