Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
069d718b
Commit
069d718b
authored
Nov 01, 2019
by
Gaurav M Shah
Committed by
Torkel Ödegaard
Nov 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Graph: Added series override option to have hidden series be persisted (#20124)
parent
ca75a29d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
0 deletions
+14
-0
docs/sources/features/panels/graph.md
+1
-0
public/app/core/time_series2.ts
+4
-0
public/app/plugins/panel/graph/module.ts
+8
-0
public/app/plugins/panel/graph/series_overrides_ctrl.ts
+1
-0
No files found.
docs/sources/features/panels/graph.md
View file @
069d718b
...
...
@@ -137,6 +137,7 @@ Display styles control visual properties of the graph.
-
**Line Width**
- The width of the line for a series (default 1).
-
**Staircase**
- Draws adjacent points as staircase
-
**Points Radius**
- Adjust the size of points when
*Points*
are selected as
*Draw Mode*
.
-
**Hidden Series**
- Hide series by default in graph.
#### Hover tooltip
...
...
public/app/core/time_series2.ts
View file @
069d718b
...
...
@@ -94,6 +94,7 @@ export default class TimeSeries {
isOutsideRange
:
boolean
;
lines
:
any
;
hiddenSeries
:
boolean
;
dashes
:
any
;
bars
:
any
;
points
:
any
;
...
...
@@ -200,6 +201,9 @@ export default class TimeSeries {
if
(
override
.
yaxis
!==
void
0
)
{
this
.
yaxis
=
override
.
yaxis
;
}
if
(
override
.
hiddenSeries
!==
void
0
)
{
this
.
hiddenSeries
=
override
.
hiddenSeries
;
}
}
}
...
...
public/app/plugins/panel/graph/module.ts
View file @
069d718b
...
...
@@ -27,6 +27,7 @@ class GraphCtrl extends MetricsPanelCtrl {
renderError
:
boolean
;
hiddenSeries
:
any
=
{};
hiddenSeriesTainted
=
false
;
seriesList
:
TimeSeries
[]
=
[];
dataList
:
DataFrame
[]
=
[];
annotations
:
any
=
[];
...
...
@@ -84,6 +85,8 @@ class GraphCtrl extends MetricsPanelCtrl {
linewidth
:
1
,
// show/hide dashed line
dashes
:
false
,
// show/hide line
hiddenSeries
:
false
,
// length of a dash
dashLength
:
10
,
// length of space between two dashes
...
...
@@ -165,6 +168,7 @@ class GraphCtrl extends MetricsPanelCtrl {
this
.
addEditorTab
(
'Thresholds & Time Regions'
,
'public/app/plugins/panel/graph/tab_thresholds_time_regions.html'
);
this
.
addEditorTab
(
'Data links'
,
'public/app/plugins/panel/graph/tab_drilldown_links.html'
);
this
.
subTabIndex
=
0
;
this
.
hiddenSeriesTainted
=
false
;
}
onInitPanelActions
(
actions
:
any
[])
{
...
...
@@ -267,6 +271,9 @@ class GraphCtrl extends MetricsPanelCtrl {
if
(
series
.
unit
)
{
this
.
panel
.
yaxes
[
series
.
yaxis
-
1
].
format
=
series
.
unit
;
}
if
(
this
.
hiddenSeriesTainted
===
false
&&
series
.
hiddenSeries
===
true
)
{
this
.
hiddenSeries
[
series
.
alias
]
=
true
;
}
}
}
...
...
@@ -277,6 +284,7 @@ class GraphCtrl extends MetricsPanelCtrl {
};
onToggleSeries
=
(
hiddenSeries
:
any
)
=>
{
this
.
hiddenSeriesTainted
=
true
;
this
.
hiddenSeries
=
hiddenSeries
;
this
.
render
();
};
...
...
public/app/plugins/panel/graph/series_overrides_ctrl.ts
View file @
069d718b
...
...
@@ -106,6 +106,7 @@ export function SeriesOverridesCtrl($scope: any, $element: JQuery, popoverSrv: a
$scope
.
addOverrideOption
(
'Fill below to'
,
'fillBelowTo'
,
$scope
.
getSeriesNames
());
$scope
.
addOverrideOption
(
'Staircase line'
,
'steppedLine'
,
[
true
,
false
]);
$scope
.
addOverrideOption
(
'Dashes'
,
'dashes'
,
[
true
,
false
]);
$scope
.
addOverrideOption
(
'Hidden Series'
,
'hiddenSeries'
,
[
true
,
false
]);
$scope
.
addOverrideOption
(
'Dash Length'
,
'dashLength'
,
[
1
,
2
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment