From ab4d75691edf3e95e11e0e2090fbcf8a132ce882 Mon Sep 17 00:00:00 2001 From: Danny White <3104761+dnywh@users.noreply.github.com> Date: Tue, 12 Aug 2025 10:34:04 +1000 Subject: [PATCH] wip: bars bars bars --- .../SurveyResults/GenericChartWithQuery.tsx | 8 +- .../SurveyResults/SurveyChapter.tsx | 2 +- .../SurveyResults/SurveyRankedAnswersPair.tsx | 34 ++++++-- .../SurveyResults/SurveyStatCard.tsx | 59 +++++++++----- .../SurveyResults/SurveySummarizedAnswer.tsx | 77 +++++++++++++++---- .../SurveyResults/SurveyWordCloud.tsx | 50 ++++++++---- 6 files changed, 169 insertions(+), 61 deletions(-) diff --git a/apps/www/components/SurveyResults/GenericChartWithQuery.tsx b/apps/www/components/SurveyResults/GenericChartWithQuery.tsx index 4f286190725..400179f93dc 100644 --- a/apps/www/components/SurveyResults/GenericChartWithQuery.tsx +++ b/apps/www/components/SurveyResults/GenericChartWithQuery.tsx @@ -307,13 +307,11 @@ export function GenericChartWithQuery({ const displayData = isLoading ? skeletonData : chartData || [] return ( -
+

{title}

-
+
{/* Filters and toggle */}
{filters && activeFilters && setFilterValue && ( @@ -397,7 +395,7 @@ export function GenericChartWithQuery({ width: `calc(max(0.5%, (var(--bar-value) / var(--reference)) * 100%))`, transform: shouldAnimateBars ? 'scaleX(1)' : 'scaleX(0)', transformOrigin: 'left', - transition: `transform 0.4s steps(${Math.max(2, Math.floor((item.value / maxValue) * 12))}, end) ${index * 0.05}s`, + transition: `transform 0.5s steps(${Math.max(2, Math.floor((item.value / maxValue) * 12))}, end) ${index * 0.05}s`, }} > {/* Foreground pattern for the filled portion */} diff --git a/apps/www/components/SurveyResults/SurveyChapter.tsx b/apps/www/components/SurveyResults/SurveyChapter.tsx index f4c2d90074d..750b299be2a 100644 --- a/apps/www/components/SurveyResults/SurveyChapter.tsx +++ b/apps/www/components/SurveyResults/SurveyChapter.tsx @@ -25,7 +25,7 @@ export function SurveyChapter({ return (
diff --git a/apps/www/components/SurveyResults/SurveyRankedAnswersPair.tsx b/apps/www/components/SurveyResults/SurveyRankedAnswersPair.tsx index 4b2073ed081..8e8b52acfa1 100644 --- a/apps/www/components/SurveyResults/SurveyRankedAnswersPair.tsx +++ b/apps/www/components/SurveyResults/SurveyRankedAnswersPair.tsx @@ -4,14 +4,38 @@ export function SurveyRankedAnswersPair({ rankedAnswersPair: Array<{ label: string; answers: string[] }> }) { return ( -