fix min date chart bug when using all time

This commit is contained in:
Francis Cao 2024-11-27 10:38:45 -08:00
parent bf89dfdd49
commit c851f3bb3c
4 changed files with 19 additions and 7 deletions

View file

@ -14,9 +14,16 @@ export interface PagepageviewsChartProps extends BarChartProps {
};
unit: string;
isLoading?: boolean;
isAllTime?: boolean;
}
export function PagepageviewsChart({ data, unit, isLoading, ...props }: PagepageviewsChartProps) {
export function PagepageviewsChart({
data,
unit,
isLoading,
isAllTime,
...props
}: PagepageviewsChartProps) {
const { formatMessage, labels } = useMessages();
const { colors } = useTheme();
const { locale } = useLocale();
@ -74,6 +81,7 @@ export function PagepageviewsChart({ data, unit, isLoading, ...props }: Pagepage
data={chartData}
unit={unit}
isLoading={isLoading}
isAllTime={isAllTime}
renderXLabel={renderDateLabels(unit, locale)}
/>
);