@@ -64,6 +64,7 @@ const chartTitle = ref(null);
6464const chartLegend = ref (null );
6565const chartSlicer = ref (null );
6666const source = ref (null );
67+ const noTitle = ref (null );
6768const slicerStep = ref (0 );
6869const tableStep = ref (0 );
6970const titleStep = ref (0 );
@@ -136,7 +137,8 @@ function prepareChart() {
136137 title: FINAL_CONFIG .value .style .title .text ? chartTitle .value : null ,
137138 slicer: chartSlicer .value ,
138139 legend: chartLegend .value ,
139- source: source .value
140+ source: source .value ,
141+ noTitle: noTitle .value
140142 });
141143 svg .value .width = width;
142144 svg .value .height = height;
@@ -170,6 +172,10 @@ const { isPrinting, isImaging, generatePdf, generateImage } = usePrinter({
170172 fileName: FINAL_CONFIG .value .style .title .text || ' vue-ui-candlestick'
171173});
172174
175+ const hasOptionsNoTitle = computed (() => {
176+ return FINAL_CONFIG .value .userOptions .show && ! FINAL_CONFIG .value .style .title .text ;
177+ });
178+
173179const mutableConfig = ref ({
174180 showTable: FINAL_CONFIG .value .table .show ,
175181 showTooltip: FINAL_CONFIG .value .style .tooltip .show
@@ -473,7 +479,7 @@ defineExpose({
473479 </script >
474480
475481<template >
476- <div ref =" candlestickChart" :class =" `vue-ui-candlestick ${isFullscreen ? 'vue-data-ui-wrapper-fullscreen' : ''} ${FINAL_CONFIG.useCssAnimation ? '' : 'vue-ui-dna'}`" :style =" `position:relative;font-family:${FINAL_CONFIG.style.fontFamily}; text-align:center;${!FINAL_CONFIG.style.title.text ? 'padding-top:36px' : ''}; background:${FINAL_CONFIG.style.backgroundColor}; ${FINAL_CONFIG.responsive ? 'height: 100%' : ''}`" :id =" `vue-ui-candlestick_${uid}`" >
482+ <div ref =" candlestickChart" :class =" `vue-ui-candlestick ${isFullscreen ? 'vue-data-ui-wrapper-fullscreen' : ''} ${FINAL_CONFIG.useCssAnimation ? '' : 'vue-ui-dna'}`" :style =" `position:relative;font-family:${FINAL_CONFIG.style.fontFamily}; text-align:center;background:${FINAL_CONFIG.style.backgroundColor}; ${FINAL_CONFIG.responsive ? 'height: 100%' : ''}`" :id =" `vue-ui-candlestick_${uid}`" >
477483 <PenAndPaper
478484 v-if =" FINAL_CONFIG.userOptions.buttons.annotator"
479485 :parent =" candlestickChart"
@@ -483,6 +489,13 @@ defineExpose({
483489 @close =" toggleAnnotator"
484490 />
485491
492+ <div
493+ ref =" noTitle"
494+ v-if =" hasOptionsNoTitle"
495+ class =" vue-data-ui-no-title-space"
496+ :style =" `height:36px; width: 100%;background:transparent`"
497+ />
498+
486499 <div ref =" chartTitle" v-if =" FINAL_CONFIG.style.title.text" :style =" `width:100%;background:transparent`" >
487500 <!-- TITLE AS DIV -->
488501 <Title
0 commit comments