bump recharts to 2.5.0
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -109,7 +109,7 @@ export function StatusChart(props: StatusChartProps) {
|
||||
const tooltipFormatter = useMemo(() => {
|
||||
const reasonSet = new Set(analysis.daily.triggerReasons);
|
||||
|
||||
return (percentOrCount: number, name: string) => {
|
||||
return (percentOrCount: number, name: string): [any, any] => {
|
||||
const label = reasonSet.has(name)
|
||||
? humanTriggerReason(name)
|
||||
: capitalize(name);
|
||||
@@ -118,6 +118,7 @@ export function StatusChart(props: StatusChartProps) {
|
||||
: percentOrCount;
|
||||
|
||||
return [
|
||||
// TODO(Rugvip): Types don't allow returning elements, but it was here before so presumably works
|
||||
<Typography component="span">
|
||||
{label}: {valueText}
|
||||
</Typography>,
|
||||
|
||||
@@ -95,8 +95,12 @@ export function tickFormatterY(duration: number) {
|
||||
.replace(/year.*/, 'y');
|
||||
}
|
||||
|
||||
export function tooltipValueFormatter(durationOrCount: number, name: string) {
|
||||
export function tooltipValueFormatter(
|
||||
durationOrCount: number,
|
||||
name: string,
|
||||
): [any, any] {
|
||||
return [
|
||||
// TODO(Rugvip): Types don't allow returning elements, but it was here before so presumably works
|
||||
<Typography component="span" style={infoText}>
|
||||
{capitalize(name)}:{' '}
|
||||
{name.endsWith(' count')
|
||||
|
||||
Reference in New Issue
Block a user