Initial commit - WhyRating Engine (Google Reviews Scraper)

This commit is contained in:
Alejandro Gutiérrez
2026-02-02 18:19:00 +00:00
parent 0543a08242
commit 2206ddeff2
136 changed files with 51138 additions and 855 deletions

View File

@@ -41,7 +41,7 @@ export function PieChartWidget({
error,
onRefresh,
}: PieChartWidgetProps) {
const chartConfig = config.config as PieChartConfig;
const chartConfig = config.config as unknown as PieChartConfig;
const chartData = data?.data || [];
const colors = chartConfig.colors || DEFAULT_COLORS;
const innerRadius = chartConfig.inner_radius || 0; // 0 = pie, > 0 = donut
@@ -71,7 +71,7 @@ export function PieChartWidget({
nameKey="name"
label={
chartConfig.show_labels !== false
? ({ name, percent }) => `${name} ${(percent * 100).toFixed(0)}%`
? ({ name, percent }) => `${name} ${((percent ?? 0) * 100).toFixed(0)}%`
: undefined
}
labelLine={chartConfig.show_labels !== false}
@@ -89,7 +89,7 @@ export function PieChartWidget({
border: '1px solid #e5e7eb',
borderRadius: '0.375rem',
}}
formatter={(value: number) => [value.toLocaleString(), 'Count']}
formatter={(value) => [(value ?? 0).toLocaleString(), 'Count']}
/>
{chartConfig.show_legend !== false && (
<Legend