diff --git a/packages/docs/src/benchmarks/shared/InteractionBreakdownChart.astro b/packages/docs/src/benchmarks/shared/InteractionBreakdownChart.astro index 384836fb..7ef23f1f 100644 --- a/packages/docs/src/benchmarks/shared/InteractionBreakdownChart.astro +++ b/packages/docs/src/benchmarks/shared/InteractionBreakdownChart.astro @@ -3,6 +3,7 @@ import { prepareInteractionBreakdownTable } from '../../lib/prepare-table' import StatsTable from '../../components/StatsTable.astro' import ViewSwitcher from '../../components/ViewSwitcher.astro' import { INTERACTION_PHASES } from '../../lib/interaction-phases' +import { stackLegendSwatch } from '../../lib/chart-styles' import InteractionChartCaption from './InteractionChartCaption.astro' import StackedBarChart from '../../components/StackedBarChart.astro' @@ -37,7 +38,11 @@ const chart1Table = prepareInteractionBreakdownTable(chart1) defaultValue="chart" > - + stackLegendSwatch(index, count)} + outlined + /> diff --git a/packages/docs/src/benchmarks/shared/InteractionChartCaption.astro b/packages/docs/src/benchmarks/shared/InteractionChartCaption.astro index a3d891bb..cda99be7 100644 --- a/packages/docs/src/benchmarks/shared/InteractionChartCaption.astro +++ b/packages/docs/src/benchmarks/shared/InteractionChartCaption.astro @@ -1,11 +1,23 @@ --- import { INTERACTION_PHASES } from '../../lib/interaction-phases' +type InteractionPhase = (typeof INTERACTION_PHASES)[number] + interface Props { title?: string + swatchColor?: ( + phase: InteractionPhase, + index: number, + count: number, + ) => string + outlined?: boolean } -const { title } = Astro.props +const { + title, + swatchColor = (phase: InteractionPhase) => phase.color, + outlined = false, +} = Astro.props ---
@@ -25,10 +37,13 @@ const { title } = Astro.props