diff options
author | Kushal Pandya <kushal@gitlab.com> | 2018-07-23 12:40:47 +0300 |
---|---|---|
committer | Kushal Pandya <kushal@gitlab.com> | 2018-07-24 10:28:10 +0300 |
commit | d6ec3ac6ba7089b5e9ebdf1d89fe121287c7b9c0 (patch) | |
tree | c9e27a26bef5c99c57a70927f6b2dd8bfa9d6a18 /app/assets/javascripts/vue_shared/components/stacked_progress_bar.vue | |
parent | b48788149485d376776c6ad7c92ef2e4f2e49930 (diff) |
Use `roundOffFloat` method to show decimal places in progressbar
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/stacked_progress_bar.vue')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/stacked_progress_bar.vue | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/vue_shared/components/stacked_progress_bar.vue b/app/assets/javascripts/vue_shared/components/stacked_progress_bar.vue index b1c2df54ef6..f44d361c47e 100644 --- a/app/assets/javascripts/vue_shared/components/stacked_progress_bar.vue +++ b/app/assets/javascripts/vue_shared/components/stacked_progress_bar.vue @@ -1,4 +1,5 @@ <script> +import { roundOffFloat } from '~/lib/utils/common_utils'; import tooltip from '~/vue_shared/directives/tooltip'; export default { @@ -70,7 +71,7 @@ export default { }, methods: { getPercent(count) { - return Math.ceil((count / this.totalCount) * 100); + return roundOffFloat((count / this.totalCount) * 100, 1); }, barStyle(percent) { return `width: ${percent}%;`; |