Skip to content

Commit

Permalink
feat: add extra space between color and text to chart tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
achamorro-dev committed Mar 13, 2023
1 parent e2aa296 commit 8cd4008
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export const getTooltipLabel = (context: TooltipLabelContext, settings: Settings
const isRecommendedDataset = dataset.type === 'line'
if (isRecommendedDataset)
return [
dataset.label,
getDurationByHours(dataset.data[dataIndex].y, settings.useDecimalTimeFormat),
' ' + dataset.label,
' ' + getDurationByHours(dataset.data[dataIndex].y, settings.useDecimalTimeFormat),
''
]

Expand All @@ -36,8 +36,8 @@ export const getTooltipLabel = (context: TooltipLabelContext, settings: Settings
if (value === 0) return ''

return [
i18n.t('vacations'),
`${getDurationByHours(value, settings.useDecimalTimeFormat)} - ${PercentageFormatter.format(
' ' + i18n.t('vacations'),
` ${getDurationByHours(value, settings.useDecimalTimeFormat)} - ${PercentageFormatter.format(
percentage
)}`,
''
Expand All @@ -48,10 +48,10 @@ export const getTooltipLabel = (context: TooltipLabelContext, settings: Settings

if (value === 0) return ''
return [
organization,
project,
role,
`${getDurationByHours(value, settings.useDecimalTimeFormat)} - ${PercentageFormatter.format(
' ' + organization,
' ' + project,
' ' + role,
` ${getDurationByHours(value, settings.useDecimalTimeFormat)} - ${PercentageFormatter.format(
percentage
)}`,
''
Expand Down

0 comments on commit 8cd4008

Please sign in to comment.