Skip to content

Commit

Permalink
fix: default constant value same to svg
Browse files Browse the repository at this point in the history
  • Loading branch information
firejune committed Nov 7, 2023
1 parent 0159498 commit e2f8ea2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
17 changes: 2 additions & 15 deletions src/app/[username]/Canvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,12 @@ import format from 'date-fns/format'
import getMonth from 'date-fns/getMonth'
import parseISO from 'date-fns/parseISO'

import type { Contrib } from './Chart'

type ChartProps = {
data: Contrib[][]
username: string
count?: string
options: {
boxMargin?: number
borderRadius?: number
showWeekDays?: boolean
showFooter?: boolean
}
scheme?: 'light' | 'dark'
}
import type { Contrib, ChartProps } from './Chart'

const boxSize = 10
const textHeight = 15
const canvasMargin = 2
const defaultBoxMargin = 2
const defaultBoxMargin = 3
const defaultBorderRadius = 2
const scaleFactor = 3

Expand Down
4 changes: 2 additions & 2 deletions src/app/[username]/Chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export type Contrib = {
intensity?: string
}

type ChartProps = {
export type ChartProps = {
data: Contrib[][]
username: string
count?: string
Expand All @@ -22,10 +22,10 @@ type ChartProps = {
}

const boxSize = 10
const textHeight = 15
const canvasMargin = 2
const defaultBoxMargin = 3
const defaultBorderRadius = 2
const textHeight = 15
const fontSize = '10px'

const Chart = ({
Expand Down

0 comments on commit e2f8ea2

Please sign in to comment.