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
adb97a0f
Commit
adb97a0f
authored
Feb 07, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #42 : Auto Y scale is working as it should (even when using line fill)
parent
f2f435b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
22 deletions
+23
-22
src/app/directives/grafanaGraph.js
+21
-20
src/app/panels/graphite/axisEditor.html
+2
-2
No files found.
src/app/directives/grafanaGraph.js
View file @
adb97a0f
...
...
@@ -87,8 +87,8 @@ function (angular, $, kbn, moment, _) {
stack
:
scope
.
panel
.
percentage
?
null
:
stack
,
lines
:
{
show
:
scope
.
panel
.
lines
,
// Silly, but fixes bug in stacked percentages
fill
:
scope
.
panel
.
fill
===
0
?
0.001
:
scope
.
panel
.
fill
/
10
,
zero
:
false
,
fill
:
scope
.
panel
.
fill
===
0
?
false
:
scope
.
panel
.
fill
/
10
,
lineWidth
:
scope
.
panel
.
linewidth
,
steps
:
scope
.
panel
.
steppedLine
},
...
...
@@ -186,25 +186,26 @@ function (angular, $, kbn, moment, _) {
elem
.
html
(
'<img src="'
+
url
+
'"></img>'
);
}
function
addAnnotations
(
options
)
{
if
(
scope
.
panel
.
annotate
.
enable
)
{
options
.
events
=
{
levels
:
1
,
data
:
scope
.
annotations
,
types
:
{
'annotation'
:
{
level
:
1
,
icon
:
{
icon
:
"icon-tag icon-flip-vertical"
,
size
:
20
,
color
:
"#222"
,
outline
:
"#bbb"
}
if
(
!
scope
.
panel
.
annotate
.
enable
)
{
return
;
}
options
.
events
=
{
levels
:
1
,
data
:
scope
.
annotations
,
types
:
{
'annotation'
:
{
level
:
1
,
icon
:
{
icon
:
"icon-tag icon-flip-vertical"
,
size
:
20
,
color
:
"#222"
,
outline
:
"#bbb"
}
}
}
;
}
}
}
;
}
function
addAxisLabels
()
{
...
...
@@ -224,8 +225,8 @@ function (angular, $, kbn, moment, _) {
var
defaults
=
{
position
:
'left'
,
show
:
scope
.
panel
[
'y-axis'
],
min
:
scope
.
panel
.
grid
.
min
,
max
:
scope
.
panel
.
percentage
&&
scope
.
panel
.
stack
?
100
:
scope
.
panel
.
grid
.
max
,
min
:
null
,
max
:
null
,
};
options
.
yaxes
.
push
(
defaults
);
...
...
src/app/panels/graphite/axisEditor.html
View file @
adb97a0f
...
...
@@ -10,11 +10,11 @@
</div>
<div
class=
"editor-option"
>
<label
class=
"small"
>
Left Y Format
<tip>
Y-axis formatting
</tip></label>
<select
class=
"input-small"
ng-model=
"panel.y_formats[
1
]"
ng-options=
"f for f in ['none','short','bytes', 'ms']"
ng-change=
"render()"
></select>
<select
class=
"input-small"
ng-model=
"panel.y_formats[
0
]"
ng-options=
"f for f in ['none','short','bytes', 'ms']"
ng-change=
"render()"
></select>
</div>
<div
class=
"editor-option"
>
<label
class=
"small"
>
Right Y Format
<tip>
Y-axis formatting
</tip></label>
<select
class=
"input-small"
ng-model=
"panel.y_formats[
2
]"
ng-options=
"f for f in ['none','short','bytes', 'ms']"
ng-change=
"render()"
></select>
<select
class=
"input-small"
ng-model=
"panel.y_formats[
1
]"
ng-options=
"f for f in ['none','short','bytes', 'ms']"
ng-change=
"render()"
></select>
</div>
<div
class=
"editor-option"
>
...
...
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