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

Add Y axes alignment attribut to graph_panel #273

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions grafonnet/graph_panel.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
* @param value_type (default `'individual'`) Type of tooltip value
* @param shared_tooltip (default `true`) Allow to group or spit tooltips on mouseover within a chart
* @param percentage (defaut: false) show as percentages
* @param y_axis_align (defaut: false) Set Y-axis alignment
* @param y_axis_align_level (defaut: null) Set Y-axis alignment level
*
* @method addTarget(target) Adds a target object.
* @method addTargets(targets) Adds an array of targets.
Expand Down Expand Up @@ -125,6 +127,8 @@
percentage=false,
time_from=null,
time_shift=null,
y_axis_align=false,
y_axis_align_level=null,
):: {
title: title,
[if span != null then 'span']: span,
Expand Down Expand Up @@ -164,6 +168,10 @@
[if x_axis_min != null then 'min']: x_axis_min,
[if x_axis_max != null then 'max']: x_axis_max,
},
yaxis: {
align: y_axis_align,
alignLevel: y_axis_align_level,
},
lines: lines,
fill: fill,
linewidth: linewidth,
Expand Down