@@ -10,6 +10,7 @@ import {
1010 error ,
1111 functionReturnsString ,
1212 getMissingDatasetAttributes ,
13+ hasDeepProperty ,
1314 interpolateColorHex ,
1415 isFunction ,
1516 objectIsEmpty ,
@@ -70,16 +71,31 @@ const FINAL_CONFIG = computed(() => {
7071 userConfig: props .config ,
7172 defaultConfig: DEFAULT_CONFIG
7273 });
74+
75+ let finalConfig = {};
76+
7377 if (mergedConfig .theme ) {
74- return {
78+ finalConfig = {
7579 ... useNestedProp ({
7680 userConfig: themes .vue_ui_heatmap [mergedConfig .theme ] || props .config ,
7781 defaultConfig: mergedConfig
7882 }),
7983 }
8084 } else {
81- return mergedConfig;
85+ finalConfig = mergedConfig;
86+ }
87+
88+ // ------------------------------ OVERRIDES -----------------------------------
89+
90+ if (props .config && hasDeepProperty (props .config , ' style.layout.dataLabels.xAxis.showOnlyAtModulo' )) {
91+ finalConfig .style .layout .dataLabels .xAxis .showOnlyAtModulo = props .config .style .layout .dataLabels .xAxis .showOnlyAtModulo ;
92+ } else {
93+ finalConfig .style .layout .dataLabels .xAxis .showOnlyAtModulo = null ;
8294 }
95+
96+ // ----------------------------------------------------------------------------
97+
98+ return finalConfig;
8399});
84100
85101const { isPrinting , isImaging , generatePdf , generateImage } = usePrinter ({
@@ -474,16 +490,18 @@ defineExpose({
474490 </g >
475491 </g >
476492 <g v-if =" FINAL_CONFIG.style.layout.dataLabels.xAxis.show" >
477- <text v-for =" (label, i) in dataLabels.xLabels"
478- :x =" drawingArea.left + cellSize.width / 2 + (drawingArea.width / dataLabels.xLabels.length * i) + FINAL_CONFIG.style.layout.dataLabels.xAxis.offsetX"
479- :y =" drawingArea.top + FINAL_CONFIG.style.layout.dataLabels.xAxis.offsetY - 6"
480- text-anchor =" middle"
481- :font-size =" FINAL_CONFIG.style.layout.dataLabels.xAxis.fontSize"
482- :fill =" FINAL_CONFIG.style.layout.dataLabels.xAxis.color"
483- :font-weight =" FINAL_CONFIG.style.layout.dataLabels.xAxis.bold ? 'bold' : 'normal'"
484- >
485- {{ label }}
486- </text >
493+ <template v-for =" (label , i ) in dataLabels .xLabels " >
494+ <text
495+ v-if =" !FINAL_CONFIG.style.layout.dataLabels.xAxis.showOnlyAtModulo || (FINAL_CONFIG.style.layout.dataLabels.xAxis.showOnlyAtModulo && i % FINAL_CONFIG.style.layout.dataLabels.xAxis.showOnlyAtModulo === 0)"
496+ :text-anchor =" FINAL_CONFIG.style.layout.dataLabels.xAxis.rotation === 0 ? 'middle' : FINAL_CONFIG.style.layout.dataLabels.xAxis.rotation < 0 ? 'start' : 'end'"
497+ :font-size =" FINAL_CONFIG.style.layout.dataLabels.xAxis.fontSize"
498+ :fill =" FINAL_CONFIG.style.layout.dataLabels.xAxis.color"
499+ :font-weight =" FINAL_CONFIG.style.layout.dataLabels.xAxis.bold ? 'bold' : 'normal'"
500+ :transform =" `translate(${drawingArea.left + cellSize.width / 2 + (drawingArea.width / dataLabels.xLabels.length * i) + FINAL_CONFIG.style.layout.dataLabels.xAxis.offsetX}, ${drawingArea.top + FINAL_CONFIG.style.layout.dataLabels.xAxis.offsetY - 6}), rotate(${FINAL_CONFIG.style.layout.dataLabels.xAxis.rotation})`"
501+ >
502+ {{ label }}
503+ </text >
504+ </template >
487505 </g >
488506
489507 <!-- BORDER FOR SELECTED RECT, PAINTED LAST -->
0 commit comments