@@ -83,6 +83,7 @@ const baseWidth = ref(512);
8383const selectedX = ref (null );
8484const selectedDatapoint = ref (null );
8585const dialog = ref (null );
86+ const parentHeight = ref (0 );
8687
8788function prepareConfig () {
8889 const mergedConfig = useNestedProp ({
@@ -184,12 +185,14 @@ function prepareChart() {
184185 title: FINAL_CONFIG .value .style .chart .title .text ? chartTitle .value : null ,
185186 legend: FINAL_CONFIG .value .style .chart .legend .show ? chartLegend .value : null ,
186187 source: source .value ,
187- noTitle: noTitle .value
188+ noTitle: noTitle .value ,
189+ padding: FINAL_CONFIG .value .style .chart .padding
188190 });
189191
190192 requestAnimationFrame (() => {
191193 baseWidth .value = width;
192194 rowHeight .value = (height / props .dataset .length );
195+ parentHeight .value = height
193196 });
194197 });
195198
@@ -720,7 +723,7 @@ defineExpose({
720723 <svg ref =" svgRef" :xmlns =" XMLNS" v-if =" isDataset"
721724 :class =" { 'vue-data-ui-fullscreen--on': isFullscreen, 'vue-data-ui-fulscreen--off': !isFullscreen }"
722725 :viewBox =" `0 0 ${svg.width <= 0 ? 10 : svg.width} ${drawableArea.fullHeight <= 0 ? 10 : drawableArea.fullHeight}`"
723- :style =" `max-width:100%;overflow:visible;background:transparent;color:${FINAL_CONFIG.style.chart.color};${FINAL_CONFIG.responsive ? ' height: 100% ; width: 100%;' : ''}`" >
726+ :style =" `max-width:100%;overflow:visible;background:transparent;color:${FINAL_CONFIG.style.chart.color};${FINAL_CONFIG.responsive ? ` height: ${parentHeight}px ; width: 100%;` : ''}`" >
724727 <defs >
725728 <linearGradient
726729 v-for =" (dp, i) in legendSet"
0 commit comments