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
c2b6a241
Commit
c2b6a241
authored
Feb 23, 2022
by
Anshul Riyal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactored heatmap chart responsiveness
parent
6172b14a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
23 deletions
+11
-23
app/assets/javascripts/monitoring/components/charts/heatmap.vue
...sets/javascripts/monitoring/components/charts/heatmap.vue
+11
-23
No files found.
app/assets/javascripts/monitoring/components/charts/heatmap.vue
View file @
c2b6a241
<
script
>
import
{
GlResizeObserverDirective
}
from
'
@gitlab/ui
'
;
import
{
GlHeatmap
}
from
'
@gitlab/ui/dist/charts
'
;
import
{
formatDate
,
timezones
,
formats
}
from
'
../../format_date
'
;
import
{
graphDataValidatorForValues
}
from
'
../../utils
'
;
...
...
@@ -8,9 +7,6 @@ export default {
components
:
{
GlHeatmap
,
},
directives
:
{
GlResizeObserverDirective
,
},
props
:
{
graphData
:
{
type
:
Object
,
...
...
@@ -61,26 +57,18 @@ export default {
return
this
.
graphData
.
metrics
[
0
];
},
},
methods
:
{
onResize
()
{
if
(
this
.
$refs
.
heatmapChart
)
return
;
const
{
width
}
=
this
.
$refs
.
heatmapChart
.
$el
.
getBoundingClientRect
();
this
.
width
=
width
;
},
},
};
</
script
>
<
template
>
<div
v-gl-resize-observer-directive=
"onResize"
>
<gl-heatmap
ref=
"heatmapChart"
v-bind=
"$attrs"
:data-series=
"chartData"
:x-axis-name=
"xAxisName"
:y-axis-name=
"yAxisName"
:x-axis-labels=
"xAxisLabels"
:y-axis-labels=
"yAxisLabels"
:width=
"width"
/>
</div>
<gl-heatmap
ref=
"heatmapChart"
v-bind=
"$attrs"
:responsive=
"true"
:data-series=
"chartData"
:x-axis-name=
"xAxisName"
:y-axis-name=
"yAxisName"
:x-axis-labels=
"xAxisLabels"
:y-axis-labels=
"yAxisLabels"
:width=
"width"
/>
</
template
>
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