diff --git a/packages/vuetify/src/components/VSparkline/VTrendline.tsx b/packages/vuetify/src/components/VSparkline/VTrendline.tsx index 4cee7027c04..62ee2ac6e1d 100644 --- a/packages/vuetify/src/components/VSparkline/VTrendline.tsx +++ b/packages/vuetify/src/components/VSparkline/VTrendline.tsx @@ -151,7 +151,7 @@ export const VTrendline = genericComponent()({ function genPath (fill: boolean) { return _genPath( genPoints(items.value, boundary.value), - props.smooth ? 8 : Number(props.smooth), + typeof props.smooth === 'number' ? props.smooth : props.smooth ? 8 : 0, fill, parseInt(props.height, 10) ) diff --git a/packages/vuetify/src/components/VSparkline/util/line.ts b/packages/vuetify/src/components/VSparkline/util/line.ts index 04c6e264bbc..ad511f6b0c9 100644 --- a/packages/vuetify/src/components/VSparkline/util/line.ts +++ b/packages/vuetify/src/components/VSparkline/util/line.ts @@ -4,7 +4,7 @@ import { propsFactory } from '@/util' // Types import type { PropType } from 'vue' -export type SparklineItem = number | { value: number } +export type SparklineItem = string | number | { value: number } export const makeLineProps = propsFactory({ autoDraw: Boolean, @@ -55,7 +55,7 @@ export const makeLineProps = propsFactory({ default: 8, }, showLabels: Boolean, - smooth: Boolean, + smooth: [Boolean, Number], width: { type: [Number, String], default: 300,