@@ -231,18 +231,16 @@ const svg = ref({
231
231
232
232
const emits = defineEmits ([' hoverIndex' , ' selectDatapoint' ])
233
233
234
- const bottomPadding = ref (6 )
235
-
236
234
const drawingArea = computed (() => {
237
- const topPadding = 12 ;
235
+ const { top : p_top , right : p_right , bottom : p_bottom , left : p_left } = FINAL_CONFIG . value . style . padding ;
238
236
return {
239
- top: topPadding ,
240
- left: 0 ,
241
- right: svg .value .width ,
242
- bottom: svg .value .height - 3 ,
243
- start: props .showInfo && FINAL_CONFIG .value .style .dataLabel .show && FINAL_CONFIG .value .style .dataLabel .position === ' left' ? svg .value .width - svg .value .chartWidth : svg .value .padding ,
244
- width: props .showInfo && FINAL_CONFIG .value .style .dataLabel .show ? svg .value .chartWidth : svg .value .width - svg .value .padding ,
245
- height: svg .value .height - topPadding
237
+ top: p_top ,
238
+ left: p_left ,
239
+ right: svg .value .width - p_right ,
240
+ bottom: svg .value .height - p_bottom ,
241
+ start: props .showInfo && FINAL_CONFIG .value .style .dataLabel .show && FINAL_CONFIG .value .style .dataLabel .position === ' left' ? svg .value .width - svg .value .chartWidth + p_left : svg .value .padding + p_left ,
242
+ width: props .showInfo && FINAL_CONFIG .value .style .dataLabel .show ? svg .value .chartWidth - p_left - p_right : svg .value .width - svg .value .padding - p_left - p_right ,
243
+ height: svg .value .height - p_top - p_bottom
246
244
}
247
245
});
248
246
@@ -268,7 +266,7 @@ const absoluteMin = computed(() => {
268
266
});
269
267
270
268
const absoluteMax = computed (() => {
271
- return max .value + absoluteMin .value + bottomPadding . value ;
269
+ return max .value + absoluteMin .value ;
272
270
});
273
271
274
272
const absoluteZero = computed (() => {
@@ -397,7 +395,7 @@ function selectDatapoint(datapoint, index) {
397
395
</div >
398
396
399
397
<!-- CHART -->
400
- <svg :xmlns =" XMLNS" v-if =" isDataset" data-cy =" sparkline-svg" :viewBox =" `0 0 ${svg.width} ${svg.height}`" :style =" `background:${FINAL_CONFIG.style.backgroundColor};overflow:hidden `" >
398
+ <svg :xmlns =" XMLNS" v-if =" isDataset" data-cy =" sparkline-svg" :viewBox =" `0 0 ${svg.width} ${svg.height}`" :style =" `background:${FINAL_CONFIG.style.backgroundColor};overflow:visible `" >
401
399
<PackageVersion />
402
400
403
401
<!-- BACKGROUND SLOT -->
0 commit comments