Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(VSparkline): accept numeric value for smooth #20795

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/vuetify/src/components/VSparkline/VTrendline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export const VTrendline = genericComponent<VTrendlineSlots>()({
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)
)
Expand Down
4 changes: 2 additions & 2 deletions packages/vuetify/src/components/VSparkline/util/line.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -55,7 +55,7 @@ export const makeLineProps = propsFactory({
default: 8,
},
showLabels: Boolean,
smooth: Boolean,
smooth: [Boolean, Number],
width: {
type: [Number, String],
default: 300,
Expand Down