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
27c536b1
Commit
27c536b1
authored
Aug 18, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small fix to 'none' axis formats and zero value when axis tickDecimals is high, Closes #707
parent
dc5973a0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletions
+5
-1
src/app/components/kbn.js
+1
-1
src/test/specs/kbn-format-specs.js
+4
-0
No files found.
src/app/components/kbn.js
View file @
27c536b1
...
...
@@ -536,7 +536,7 @@ function($, _, moment) {
var
formatted
=
String
(
Math
.
round
(
value
*
factor
)
/
factor
);
// if exponent return directly
if
(
formatted
.
indexOf
(
'e'
)
!==
-
1
)
{
if
(
formatted
.
indexOf
(
'e'
)
!==
-
1
||
value
===
0
)
{
return
formatted
;
}
...
...
src/test/specs/kbn-format-specs.js
View file @
27c536b1
...
...
@@ -27,6 +27,10 @@ define([
var
str
=
kbn
.
getFormatFunction
(
''
)(
2.75
e
-
10
,
{
tickDecimals
:
12
});
expect
(
str
).
to
.
be
(
'2.75e-10'
);
});
it
(
'should format 0 correctly'
,
function
()
{
var
str
=
kbn
.
getFormatFunction
(
''
)(
0.0
,
{
tickDecimals
:
12
});
expect
(
str
).
to
.
be
(
'0'
);
});
});
describe
(
'none format tests'
,
function
()
{
...
...
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