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
ffbbb5bc
Commit
ffbbb5bc
authored
Jan 07, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Graph: Fixed issue when using zero as a grid threshold, Fixes #1309
parent
63fa9f45
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
2 deletions
+17
-2
CHANGELOG.md
+1
-0
src/app/panels/graph/graph.js
+2
-2
src/test/specs/graph-specs.js
+14
-0
No files found.
CHANGELOG.md
View file @
ffbbb5bc
...
...
@@ -6,6 +6,7 @@
**Fixes**
-
[
Issue #1298
](
https://github.com/grafana/grafana/issues/1298
)
. InfluxDB: Fix handling of empty array in templating variable query
-
[
Issue #1309
](
https://github.com/grafana/grafana/issues/1309
)
. Graph: Fixed issue when using zero as a grid threshold
# 1.9.1 (2014-12-29)
...
...
src/app/panels/graph/graph.js
View file @
ffbbb5bc
...
...
@@ -260,14 +260,14 @@ function (angular, $, kbn, moment, _, GraphTooltip) {
}
function
addGridThresholds
(
options
,
panel
)
{
if
(
panel
.
grid
.
threshold1
)
{
if
(
_
.
isNumber
(
panel
.
grid
.
threshold1
)
)
{
var
limit1
=
panel
.
grid
.
thresholdLine
?
panel
.
grid
.
threshold1
:
(
panel
.
grid
.
threshold2
||
null
);
options
.
grid
.
markings
.
push
({
yaxis
:
{
from
:
panel
.
grid
.
threshold1
,
to
:
limit1
},
color
:
panel
.
grid
.
threshold1Color
});
if
(
panel
.
grid
.
threshold2
)
{
if
(
_
.
isNumber
(
panel
.
grid
.
threshold2
)
)
{
var
limit2
;
if
(
panel
.
grid
.
thresholdLine
)
{
limit2
=
panel
.
grid
.
threshold2
;
...
...
src/test/specs/graph-specs.js
View file @
ffbbb5bc
...
...
@@ -126,6 +126,20 @@ define([
});
});
graphScenario
(
'grid thresholds from zero'
,
function
(
ctx
)
{
ctx
.
setup
(
function
(
scope
)
{
scope
.
panel
.
grid
=
{
threshold1
:
0
,
threshold1Color
:
"#111"
,
};
});
it
(
'should add grid markings'
,
function
()
{
var
markings
=
ctx
.
plotOptions
.
grid
.
markings
;
expect
(
markings
[
0
].
yaxis
.
from
).
to
.
be
(
0
);
});
});
graphScenario
(
'should use timeStep for barWidth'
,
function
(
ctx
)
{
ctx
.
setup
(
function
(
scope
,
data
)
{
scope
.
panel
.
bars
=
true
;
...
...
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