@@ -345,16 +345,6 @@ export default {
345345 download () {
346346 const pHeight = this .pHeight + this .offsetY ;
347347
348- try {
349- this .$slots .axisTop [0 ].componentInstance .pHeight = pHeight;
350- this .$slots .axisLeft [0 ].componentInstance .pHeight = pHeight;
351- this .$slots .plot [0 ].componentInstance .pHeight = pHeight;
352- this .$slots .axisRight [0 ].componentInstance .pHeight = pHeight;
353- this .$slots .axisBottom [0 ].componentInstance .pHeight = pHeight;
354- } catch (e) {
355- console .log (e);
356- }
357-
358348 const svg = d3_create (" svg" )
359349 .attr (" width" , this .fullWidth )
360350 .attr (" height" , this .fullHeight );
@@ -364,6 +354,13 @@ export default {
364354
365355 const renderAxisToContext = (axisType ) => {
366356 if (this .$slots [axisType].length > 0 ) {
357+ try {
358+ this .$slots [axisType][0 ].componentInstance .pHeight = pHeight;
359+ this .$slots .plot [0 ].componentInstance .pHeight = pHeight;
360+ } catch (e) {
361+ console .log (e);
362+ }
363+
367364 const x = this .$slots [axisType][0 ].componentInstance .computedLeft ;
368365 let y = this .$slots [axisType][0 ].componentInstance .computedTop ;
369366 const width = this .$slots [axisType][0 ].componentInstance .computedWidth ;
@@ -404,6 +401,12 @@ export default {
404401
405402 const renderPlotToContext = () => {
406403 if (this .$slots .plot .length > 0 ) {
404+ try {
405+ this .$slots .plot [0 ].componentInstance .pHeight = pHeight;
406+ } catch (e) {
407+ console .log (e);
408+ }
409+
407410 const x = this .pMarginLeft ;
408411 const y = this .pMarginTop ;
409412 const width = this .pWidth ;
0 commit comments