@@ -1316,27 +1316,29 @@ defineExpose({
1316
1316
</template >
1317
1317
</g >
1318
1318
<g class =" periodLabels" v-if =" FINAL_CONFIG.xyShowScale && FINAL_CONFIG.xyPeriods.length" >
1319
- <line
1320
- data-cy =" period-tick"
1321
- v-for =" (_, i) in FINAL_CONFIG.xyPeriods.slice(slicer.start, slicer.end)"
1322
- :x1 =" line.drawingArea.left + (line.slotSize * (i+1)) - (line.slotSize / 2)"
1323
- :x2 =" line.drawingArea.left + (line.slotSize * (i+1)) - (line.slotSize / 2)"
1324
- :y1 =" line.drawingArea.bottom"
1325
- :y2 =" line.drawingArea.bottom + 4"
1326
- :stroke =" FINAL_CONFIG.xyAxisStroke"
1327
- :stroke-width =" FINAL_CONFIG.xyAxisStrokeWidth"
1328
- stroke-linecap =" round"
1329
- />
1330
- <text
1331
- data-cy =" period-label"
1332
- v-for =" (period, i) in FINAL_CONFIG.xyPeriods.slice(slicer.start, slicer.end)"
1333
- :font-size =" FINAL_CONFIG.xyLabelsXFontSize"
1334
- :text-anchor =" FINAL_CONFIG.xyPeriodLabelsRotation > 0 ? 'start' : FINAL_CONFIG.xyPeriodLabelsRotation < 0 ? 'end' : 'middle'"
1335
- :fill =" FINAL_CONFIG.color"
1336
- :transform =" `translate(${line.drawingArea.left + (line.slotSize * (i+1)) - (line.slotSize / 2)}, ${line.drawingArea.bottom + FINAL_CONFIG.xyLabelsXFontSize + 6}), rotate(${FINAL_CONFIG.xyPeriodLabelsRotation})`"
1337
- >
1338
- {{ period }}
1339
- </text >
1319
+ <template v-for =" (period , i ) in FINAL_CONFIG .xyPeriods .slice (slicer .start , slicer .end ) " >
1320
+ <line
1321
+ v-if =" (!FINAL_CONFIG.xyPeriodsShowOnlyAtModulo || (FINAL_CONFIG.xyPeriodsShowOnlyAtModulo && (i % Math.floor((slicer.end - slicer.start) / FINAL_CONFIG.xyPeriodsModulo) === 0)) || (slicer.end - slicer.start <= FINAL_CONFIG.xyPeriodsModulo))"
1322
+ data-cy =" period-tick"
1323
+ :x1 =" line.drawingArea.left + (line.slotSize * (i+1)) - (line.slotSize / 2)"
1324
+ :x2 =" line.drawingArea.left + (line.slotSize * (i+1)) - (line.slotSize / 2)"
1325
+ :y1 =" line.drawingArea.bottom"
1326
+ :y2 =" line.drawingArea.bottom + 4"
1327
+ :stroke =" FINAL_CONFIG.xyAxisStroke"
1328
+ :stroke-width =" FINAL_CONFIG.xyAxisStrokeWidth"
1329
+ stroke-linecap =" round"
1330
+ />
1331
+ <text
1332
+ v-if =" (!FINAL_CONFIG.xyPeriodsShowOnlyAtModulo || (FINAL_CONFIG.xyPeriodsShowOnlyAtModulo && (i % Math.floor((slicer.end - slicer.start) / FINAL_CONFIG.xyPeriodsModulo) === 0)) || (slicer.end - slicer.start <= FINAL_CONFIG.xyPeriodsModulo))"
1333
+ data-cy =" period-label"
1334
+ :font-size =" FINAL_CONFIG.xyLabelsXFontSize"
1335
+ :text-anchor =" FINAL_CONFIG.xyPeriodLabelsRotation > 0 ? 'start' : FINAL_CONFIG.xyPeriodLabelsRotation < 0 ? 'end' : 'middle'"
1336
+ :fill =" FINAL_CONFIG.color"
1337
+ :transform =" `translate(${line.drawingArea.left + (line.slotSize * (i+1)) - (line.slotSize / 2)}, ${line.drawingArea.bottom + FINAL_CONFIG.xyLabelsXFontSize + 6}), rotate(${FINAL_CONFIG.xyPeriodLabelsRotation})`"
1338
+ >
1339
+ {{ period }}
1340
+ </text >
1341
+ </template >
1340
1342
</g >
1341
1343
<g class =" plots" >
1342
1344
<template v-for =" (ds , i ) in line .dataset " >
0 commit comments