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
3292a483
Commit
3292a483
authored
May 26, 2017
by
Daniel Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
graph: dashes with linewidth fix. Fixes #8469
Adds series override options for dash spaces and dash length.
parent
84226971
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletions
+18
-1
public/app/core/time_series2.ts
+3
-1
public/app/plugins/panel/graph/series_overrides_ctrl.js
+2
-0
public/test/core/time_series_specs.js
+13
-0
No files found.
public/app/core/time_series2.ts
View file @
3292a483
...
...
@@ -87,9 +87,11 @@ export default class TimeSeries {
if
(
override
.
fill
!==
void
0
)
{
this
.
lines
.
fill
=
translateFillOption
(
override
.
fill
);
}
if
(
override
.
stack
!==
void
0
)
{
this
.
stack
=
override
.
stack
;
}
if
(
override
.
linewidth
!==
void
0
)
{
this
.
lines
.
lineWidth
=
override
.
linewidth
;
this
.
lines
.
lineWidth
=
this
.
dashes
.
show
?
0
:
override
.
linewidth
;
this
.
dashes
.
lineWidth
=
override
.
linewidth
;
}
if
(
override
.
dashLength
!==
void
0
)
{
this
.
dashes
.
dashLength
[
0
]
=
override
.
dashLength
;
}
if
(
override
.
spaceLength
!==
void
0
)
{
this
.
dashes
.
dashLength
[
1
]
=
override
.
spaceLength
;
}
if
(
override
.
nullPointMode
!==
void
0
)
{
this
.
nullPointMode
=
override
.
nullPointMode
;
}
if
(
override
.
pointradius
!==
void
0
)
{
this
.
points
.
radius
=
override
.
pointradius
;
}
if
(
override
.
steppedLine
!==
void
0
)
{
this
.
lines
.
steps
=
override
.
steppedLine
;
}
...
...
public/app/plugins/panel/graph/series_overrides_ctrl.js
View file @
3292a483
...
...
@@ -101,6 +101,8 @@ define([
$scope
.
addOverrideOption
(
'Fill below to'
,
'fillBelowTo'
,
$scope
.
getSeriesNames
());
$scope
.
addOverrideOption
(
'Staircase line'
,
'steppedLine'
,
[
true
,
false
]);
$scope
.
addOverrideOption
(
'Dashes'
,
'dashes'
,
[
true
,
false
]);
$scope
.
addOverrideOption
(
'Dash Length'
,
'dashLength'
,
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
19
,
20
]);
$scope
.
addOverrideOption
(
'Dash Space'
,
'spaceLength'
,
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
19
,
20
]);
$scope
.
addOverrideOption
(
'Points'
,
'points'
,
[
true
,
false
]);
$scope
.
addOverrideOption
(
'Points Radius'
,
'pointradius'
,
[
1
,
2
,
3
,
4
,
5
]);
$scope
.
addOverrideOption
(
'Stack'
,
'stack'
,
[
true
,
false
,
'A'
,
'B'
,
'C'
,
'D'
]);
...
...
public/test/core/time_series_specs.js
View file @
3292a483
...
...
@@ -211,6 +211,19 @@ define([
});
});
describe
(
'series option overrides, dashes and lineWidth'
,
function
()
{
beforeEach
(
function
()
{
series
.
alias
=
'test'
;
series
.
applySeriesOverrides
([{
alias
:
'test'
,
linewidth
:
5
,
dashes
:
true
}]);
});
it
(
'should enable dashes, set dashes lineWidth to 5 and lines lineWidth to 0'
,
function
()
{
expect
(
series
.
dashes
.
show
).
to
.
be
(
true
);
expect
(
series
.
dashes
.
lineWidth
).
to
.
be
(
5
);
expect
(
series
.
lines
.
lineWidth
).
to
.
be
(
0
);
});
});
describe
(
'series option overrides, fill below to'
,
function
()
{
beforeEach
(
function
()
{
series
.
alias
=
'test'
;
...
...
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