datareq- Type
ChartData[]- Default
- -
- Description
- Array of items with label, value, and optional color. Returns null if empty.
Search for a command to run...
Components / Display
தரவு காட்சிப்படுத்தல்
Responsive, lightweight, and highly accessible SVG-based charts. Built natively using Tailwind CSS and React without third-party visualization libraries, preventing Next.js hydration issues.
மெதுவான ஏற்றுதல் அல்லது அடுத்த கட்டமைப்பு நீர்மயமாக்கல் (SSR Hydration) பிழைகள் இன்றி, சுலபமாகச் செயல்படும் எளிய வடிவிலான SVG வரைபடங்கள்.
Bar charts represent categorical data with rectangular bars, useful for comparing discrete quantities or frequency tables.
Line charts display information as a series of data points connected by straight line segments, demonstrating continuous trends over time.
Donut charts divide data into slices to illustrate numerical proportions, featuring a hollow center for total counts and interactive legends.
5 parts documented for implementation and review.
<svg>Root SVG element with responsive viewBox. Uses role='img' and aria-label to describe the chart content for screen readers. Width is 100% of parent; height is determined by the height prop.
Dashed horizontal grid lines with Y-axis value labels (font-mono, 10px). Provides visual scale reference. X-axis labels sit below the data area.
Bars (BarChart), line path + area fill (LineChart), or arc segments (DonutChart). Use brand color token by default; DonutChart supports custom per-segment colors.
Appears on hover over a data point. Shows the exact value in a rounded pill overlay using popover design tokens for consistent theming.
Interactive legend list beside the donut. Hovering a legend item highlights the corresponding slice and updates the center label.
datareqChartData[]heightnumber240classNamestring| Prop | Type | Default | Description |
|---|---|---|---|
datareq | ChartData[] | - | Array of items with label, value, and optional color. Returns null if empty. |
height | number | 240 | Height of the rendered SVG canvas. |
className | string | - | Additional CSS classes. |
role="img" with descriptive aria-label so screen readers can announce the chart type and data point count.null when provided with empty data arrays, preventing runtime crashes.React.useId() to generate unique gradient IDs, preventing visual bugs when multiple charts render on the same page.Rely on standard system colors (primary, info, warning, success) to keep the charts aligned with the rest of the app's visual guidelines.
ஒழுங்கமைக்கப்பட்ட பிராண்ட் மற்றும் தீம் நிறங்களைப் பயன்படுத்துங்கள்.
Too many data points cram the text labels and make the chart unreadable on mobile screens. Chunk or split datasets instead.
அதிகமான தரவுகள் திரையை நெரிசலாக்கி வாசிப்பதைக் கடினமாக்கும்.
Donut charts and multi-series line charts must include a legend so users can identify each segment without relying on color alone.
வட்ட வரைபடங்களில் ஒவ்வொரு பகுதியையும் அடையாளம் காண விளக்கக் குறிப்பு இருக்க வேண்டும்.
Approximately 8% of men have color vision deficiency. Use patterns, labels, or shape variations in addition to color differences.
சுமார் 8% ஆண்களுக்கு நிற பார்வைக் குறைபாடு உள்ளது. நிற வேறுபாடுகளுடன் வடிவங்கள், உரைகள் அல்லது வடிவ மாறுபாடுகளையும் சேர்க்கவும்.