make legend X-offset into a constant

This commit is contained in:
Mike Greiling 2017-11-06 17:08:06 -06:00
parent 5cc3e23542
commit 2b9230af48
No known key found for this signature in database
GPG Key ID: 0303DF507FA67596
2 changed files with 8 additions and 6 deletions

View File

@ -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"

View File

@ -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,