For the complete documentation index, see /llms.txt. A single-fetch full bundle is at /llms-full.txt. Every docs page is also available as Markdown by appending .md to its URL, or by requesting it with Accept: text/markdown.

ReputationDistribution

Score distribution histogram showing the spread of feedback values across configurable score ranges.

Preview

Usage

import { ReputationDistribution } from "@erc8004/ui"
<ReputationDistribution agentRegistry="eip155:8453:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432" agentId={2290} />

Examples

Horizontal Orientation

Render the histogram as vertical bars in a horizontal row instead of horizontal bars in a vertical stack.

<ReputationDistribution agentRegistry="eip155:8453:0x8004...a432" agentId={2290} orientation="horizontal" />

Custom Bucket Count

Use 10 buckets for finer-grained distribution.

<ReputationDistribution agentRegistry="eip155:8453:0x8004...a432" agentId={2290} bucketCount={10} />

No Axis Labels

Hide the range labels for a more compact chart.

<ReputationDistribution agentRegistry="eip155:8453:0x8004...a432" agentId={2290} showAxisLabels={false} />

In Context

ReputationDistribution used alongside a timeline chart to show both trends and spread.

<AgentProvider agentRegistry="eip155:8453:0x8004...a432" agentId={2290}>
  <ReputationTimeline />
  <ReputationDistribution />
</AgentProvider>

API Reference

PropTypeRequiredDefaultDescription
agentRegistrystringNoAgent registry in the format "eip155:{chainId}:{contractAddress}". Required unless inside an <AgentProvider>.
agentIdnumberNoERC-721 token ID of the agent. Required unless inside an <AgentProvider>.
classNamestringNoOptional CSS classes merged onto the component root for layout, spacing, or custom styling (e.g. Tailwind).
bucketCountnumberNo5Number of histogram buckets.
orientation"vertical" | "horizontal"No"vertical"Chart layout. "vertical" = horizontal bars stacked vertically. "horizontal" = vertical bars in a row.
showAxisLabelsbooleanNotrueShow score range labels on the axis.
coloredbooleanNotrueColour bars by score band (green → gold → red). When false, uses a single accent colour.

States

This component handles loading, error, empty, and not-found states internally. A skeleton placeholder is shown while fetching, an error message with details appears if the Subgraph is unreachable, and a short message is displayed when no data exists for this agent.