Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a96e36b2
Commit
a96e36b2
authored
Jun 12, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
55bff8fc
6766a88a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
2 deletions
+21
-2
app/assets/javascripts/monitoring/components/charts/area.vue
app/assets/javascripts/monitoring/components/charts/area.vue
+2
-2
changelogs/unreleased/59651-remove-unnecessary-decimal-places-on-chart-axes.yml
...59651-remove-unnecessary-decimal-places-on-chart-axes.yml
+5
-0
spec/javascripts/monitoring/charts/area_spec.js
spec/javascripts/monitoring/charts/area_spec.js
+14
-0
No files found.
app/assets/javascripts/monitoring/components/charts/area.vue
View file @
a96e36b2
<
script
>
import
{
GlAreaChart
,
GlChartSeriesLabel
}
from
'
@gitlab/ui/dist/charts
'
;
import
dateFormat
from
'
dateformat
'
;
import
{
debounceByAnimationFrame
}
from
'
~/lib/utils/common_utils
'
;
import
{
debounceByAnimationFrame
,
roundOffFloat
}
from
'
~/lib/utils/common_utils
'
;
import
{
getSvgIconPathContent
}
from
'
~/lib/utils/icon_utils
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
{
chartHeight
,
graphTypes
,
lineTypes
}
from
'
../../constants
'
;
...
...
@@ -111,7 +111,7 @@ export default {
yAxis
:
{
name
:
this
.
yAxisLabel
,
axisLabel
:
{
formatter
:
value
=>
value
.
toFixed
(
3
),
formatter
:
num
=>
roundOffFloat
(
num
,
3
).
toString
(
),
},
},
series
:
this
.
scatterSeries
,
...
...
changelogs/unreleased/59651-remove-unnecessary-decimal-places-on-chart-axes.yml
0 → 100644
View file @
a96e36b2
---
title
:
Remove unnecessary decimals on Metrics chart axis
merge_request
:
29468
author
:
type
:
fixed
spec/javascripts/monitoring/charts/area_spec.js
View file @
a96e36b2
...
...
@@ -214,6 +214,20 @@ describe('Area component', () => {
});
});
describe
(
'
chartOptions
'
,
()
=>
{
describe
(
'
yAxis formatter
'
,
()
=>
{
let
format
;
beforeEach
(()
=>
{
format
=
areaChart
.
vm
.
chartOptions
.
yAxis
.
axisLabel
.
formatter
;
});
it
(
'
rounds to 3 decimal places
'
,
()
=>
{
expect
(
format
(
0.88888
)).
toBe
(
'
0.889
'
);
});
});
});
describe
(
'
scatterSeries
'
,
()
=>
{
it
(
'
utilizes deployment data
'
,
()
=>
{
expect
(
areaChart
.
vm
.
scatterSeries
.
data
).
toEqual
([
...
...
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