File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,11 @@ const props = defineProps<{
1919 year: string
2020 month: string
2121 day: string
22- }
22+ },
23+ showLastDatapointEstimation: boolean
2324}>()
2425
26+
2527const { locale } = useI18n ()
2628const colorMode = useColorMode ()
2729const resolvedMode = shallowRef <' light' | ' dark' >(' light' )
@@ -89,6 +91,11 @@ function resetHover() {
8991
9092const configs = computed (() => {
9193 return (props .dataset || []).map <VueUiSparklineConfig >((unit , i ) => {
94+ const lastIndex = unit .series .length - 1
95+ const dashIndices = props .showLastDatapointEstimation
96+ ? Array .from (new Set ([... (unit .dashIndices ?? []), lastIndex ]))
97+ : unit .dashIndices
98+
9299 return {
93100 a11y: {
94101 translations: {
@@ -140,6 +147,8 @@ const configs = computed(() => {
140147 },
141148 line: {
142149 color: unit .color ?? palette [i ],
150+ dashIndices ,
151+ dashArray: 3
143152 },
144153 plot: {
145154 radius: 6 ,
@@ -152,7 +161,7 @@ const configs = computed(() => {
152161 },
153162
154163 verticalIndicator: {
155- strokeDasharray: 5 ,
164+ strokeDasharray: 0 ,
156165 color: colors .value .fgSubtle ,
157166 },
158167 padding: {
Original file line number Diff line number Diff line change @@ -1933,6 +1933,7 @@ const isSparklineLayout = shallowRef(false)
19331933 :dataset =" normalisedDataset"
19341934 :dates =" chartData.dates"
19351935 :datetimeFormatterOptions
1936+ :showLastDatapointEstimation =" shouldRenderEstimationOverlay && !isEndDateOnPeriodEnd"
19361937 />
19371938 </div >
19381939
You can’t perform that action at this time.
0 commit comments