Skip to content

Commit d9ca707

Browse files
committed
fix tooltip formatting
1 parent 17e55ac commit d9ca707

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/containers/LlamaAI/components/ChartRenderer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { lazy, memo, Suspense, useEffect, useReducer, useRef } from 'react'
22
import { CSVDownloadButton } from '~/components/ButtonStyled/CsvButton'
33
import type { IBarChartProps, IChartProps, IPieChartProps, IScatterChartProps } from '~/components/ECharts/types'
4+
import { formatTooltipValue } from '~/components/ECharts/useDefaults'
45
import { Icon } from '~/components/Icon'
56
import { formattedNum } from '~/utils'
67
import type { ChartConfiguration } from '../types'
@@ -249,7 +250,7 @@ const SingleChart = memo(function SingleChart({ config, data, isActive }: Single
249250
const yValue = params[0]?.value?.[1]
250251
const seriesName = params[0]?.seriesName
251252
const valueSymbol = config.valueSymbol || '$'
252-
const formattedValue = valueSymbol === '$' ? formattedNum(yValue, true) : `${yValue}${valueSymbol}`
253+
const formattedValue = formatTooltipValue(yValue, valueSymbol)
253254
return `<div style="margin-bottom: 4px; font-weight: 600;">${xValue}</div><div>${seriesName}: ${formattedValue}</div>`
254255
}
255256
}

src/containers/LlamaAI/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1560,7 +1560,7 @@ const PromptInput = memo(function PromptInput({
15601560
onChange={onChange}
15611561
onKeyDown={onKeyDown}
15621562
name="prompt"
1563-
className="block min-h-[48px] w-full rounded-lg border border-[#e6e6e6] bg-(--app-bg) p-4 text-transparent caret-black outline-none placeholder:text-[#666] focus-visible:border-(--old-blue) max-lg:resize-none max-sm:pr-8 max-sm:text-base sm:min-h-[72px] dark:border-[#222324] dark:caret-white placeholder:dark:text-[#919296]"
1563+
className="block min-h-[48px] w-full resize-none rounded-lg border border-[#e6e6e6] bg-(--app-bg) p-4 text-transparent caret-black outline-none placeholder:text-[#666] focus-visible:border-(--old-blue) max-sm:pr-8 max-sm:text-base sm:min-h-[72px] dark:border-[#222324] dark:caret-white placeholder:dark:text-[#919296]"
15641564
autoCorrect="off"
15651565
autoComplete="off"
15661566
spellCheck="false"

0 commit comments

Comments
 (0)