-
(() => {
+ if (!stats || stats.boxplot.length === 0) return {}
+ return {
+ tooltip: {
+ trigger: "item",
+ backgroundColor: "#1a1020",
+ borderColor: CHART_THEME.border,
+ textStyle: { color: CHART_THEME.text },
+ },
+ grid: { left: 80, right: 20, top: 10, bottom: 40 },
+ xAxis: {
+ type: "category",
+ data: stats.boxplot.map((b) => b.gameTitle),
+ axisLine: { lineStyle: { color: CHART_THEME.border } },
+ axisLabel: {
+ color: CHART_THEME.textMuted,
+ fontSize: 10,
+ rotate: 30,
+ },
+ },
+ yAxis: {
+ type: "value",
+ name: "FPS",
+ axisLine: { lineStyle: { color: CHART_THEME.border } },
+ splitLine: {
+ lineStyle: { color: CHART_THEME.border, opacity: 0.3 },
+ },
+ axisLabel: { color: CHART_THEME.textMuted, fontSize: 11 },
+ nameTextStyle: { color: CHART_THEME.textMuted, fontSize: 11 },
+ },
+ series: [
+ {
+ type: "boxplot",
+ data: stats.boxplot.map((b) => [
+ b.min,
+ b.q1,
+ b.median,
+ b.q3,
+ b.max,
+ ]),
+ itemStyle: {
+ color: deviceColor + "30",
+ borderColor: deviceColor,
+ },
+ },
+ ],
+ }
+ }, [stats, deviceColor])
+
+ const genreOption = useMemo(() => {
+ if (!stats || stats.genreBreakdown.length === 0) return {}
+ return {
+ tooltip: {
+ trigger: "item",
+ backgroundColor: "#1a1025",
+ borderColor: CHART_THEME.border,
+ textStyle: { color: CHART_THEME.text },
+ },
+ series: [
+ {
+ type: "pie",
+ radius: ["40%", "70%"],
+ center: ["50%", "50%"],
+ data: stats.genreBreakdown.map((g, i) => ({
+ name: g.genre,
+ value: g.count,
+ itemStyle: {
+ color: CHART_THEME.deviceColors[
+ i % CHART_THEME.deviceColors.length
+ ],
+ },
+ })),
+ label: { color: CHART_THEME.textMuted, fontSize: 10 },
+ emphasis: {
+ itemStyle: {
+ shadowBlur: 10,
+ shadowColor: "rgba(0,0,0,0.5)",
+ },
+ },
+ },
+ ],
+ }
+ }, [stats])
+
+ return (
+
+ {/* Hero Header */}
+
- {device.image ? (
-
- ) : (
-
- )}
-
-
-
{device.name}
-
-
-
- {deviceTypeLabel[device.deviceType] || device.deviceType}
-
- {stats && stats.verifiedCount > 0 && (
-
-
- {stats.verifiedCount} verified
-
- )}
-
-
-