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
218d4812
Commit
218d4812
authored
Feb 25, 2014
by
Khushil Dep
Committed by
Torkel Odegaard
Feb 26, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the ability to set microseconds to the Y-Axis on graphs.
parent
78f4a83d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
2 deletions
+17
-2
src/app/components/kbn.js
+12
-0
src/app/directives/grafanaGraph.js
+3
-0
src/app/panels/graphite/axisEditor.html
+2
-2
No files found.
src/app/components/kbn.js
View file @
218d4812
...
...
@@ -517,5 +517,16 @@ function($, _, moment) {
}
};
kbn
.
microsFormat
=
function
(
size
)
{
if
(
size
<
1000
)
{
return
size
.
toFixed
(
0
)
+
" µs"
;
}
else
if
(
size
<
1000000
)
{
return
(
size
/
1000
).
toFixed
(
1
)
+
" ms"
;
}
else
{
return
(
size
/
1000000
).
toFixed
(
1
)
+
" s"
;
};
return
kbn
;
});
\ No newline at end of file
src/app/directives/grafanaGraph.js
View file @
218d4812
...
...
@@ -300,6 +300,9 @@ function (angular, $, kbn, moment, _) {
if
(
format
===
'ms'
)
{
axis
.
tickFormatter
=
kbn
.
msFormat
;
}
if
(
format
===
'µs'
)
{
axis
.
tickFormatter
=
kbm
.
microsFormat
;
}
}
function
time_format
(
interval
,
ticks
,
min
,
max
)
{
...
...
src/app/panels/graphite/axisEditor.html
View file @
218d4812
...
...
@@ -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[0]"
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'
, 'µs'
]"
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[1]"
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'
, 'µs'
]"
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