diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-11-06 17:08:06 -0600 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-11-06 17:08:06 -0600 |
commit | 2b9230af48372dbf7e80d773c772555ec91a5e8b (patch) | |
tree | 828a984f3beeb500436fd648537f5f8cc7e2bd33 /app/assets | |
parent | 5cc3e2354218a34954fb1dfc9d0825183bd8e800 (diff) | |
download | gitlab-ce-2b9230af48372dbf7e80d773c772555ec91a5e8b.tar.gz |
make legend X-offset into a constantmultiple-query-prometheus-graphs
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/monitoring/components/graph/legend.vue | 8 | ||||
-rw-r--r-- | app/assets/javascripts/monitoring/utils/measurements.js | 6 |
2 files changed, 8 insertions, 6 deletions
diff --git a/app/assets/javascripts/monitoring/components/graph/legend.vue b/app/assets/javascripts/monitoring/components/graph/legend.vue index 01e985cf8a4..440b1b12631 100644 --- a/app/assets/javascripts/monitoring/components/graph/legend.vue +++ b/app/assets/javascripts/monitoring/components/graph/legend.vue @@ -173,10 +173,10 @@ :stroke="series.lineColor" :stroke-width="measurements.legends.height" :stroke-dasharray="strokeDashArray(series.lineStyle)" - x1="20" - :x2="20 + measurements.legends.width" - :y1="graphHeight - measurements.legendOffset" - :y2="graphHeight - measurements.legendOffset"> + :x1="measurements.legends.offsetX" + :x2="measurements.legends.offsetX + measurements.legends.width" + :y1="graphHeight - measurements.legends.offsetY" + :y2="graphHeight - measurements.legends.offsetY"> </line> <text v-if="timeSeries.length > 1" diff --git a/app/assets/javascripts/monitoring/utils/measurements.js b/app/assets/javascripts/monitoring/utils/measurements.js index d679b2d80f2..ee866850e13 100644 --- a/app/assets/javascripts/monitoring/utils/measurements.js +++ b/app/assets/javascripts/monitoring/utils/measurements.js @@ -9,13 +9,14 @@ export default { legends: { width: 15, height: 3, + offsetX: 20, + offsetY: 32, }, backgroundLegend: { width: 30, height: 50, }, axisLabelLineOffset: -20, - legendOffset: 32, }, large: { // This covers both md and lg screen sizes margin: { @@ -27,13 +28,14 @@ export default { legends: { width: 15, height: 3, + offsetX: 20, + offsetY: 34, }, backgroundLegend: { width: 30, height: 150, }, axisLabelLineOffset: 20, - legendOffset: 34, }, xTicks: 8, yTicks: 3, |