Chart Components

Interactive SVG charts with support for bar, line, area, pie, donut, and radar types. Data can be loaded from server-side collections, inline JSON, or API endpoints.

Bar Chart

Grouped bar charts for comparing multiple data series across categories.

Monthly Revenue

Revenue vs Expenses ($)

Trending up by 12% this quarter

Profit by Month

Net profit after expenses

View Code
<noundry-chart
    type="bar"
    title="Monthly Revenue"
    description="Revenue vs Expenses ($)"
    x-axis="month"
    height="300"
    show-grid="true"
    show-legend="true"
    show-tooltip="true"
    items="@Model.RevenueData"
    footer-text="Trending up by 12% this quarter">
    <noundry-chart-series key="revenue" label="Revenue" color="indigo" />
    <noundry-chart-series key="expenses" label="Expenses" color="emerald" />
</noundry-chart>

Line Chart

Line charts for visualizing trends over time with multiple series.

Revenue Trend

Monthly revenue and expenses

Profit Trend

Net profit over time

View Code
<noundry-chart
    type="line"
    title="Revenue Trend"
    x-axis="month"
    items="@Model.RevenueData">
    <noundry-chart-series key="revenue" label="Revenue" color="indigo" />
    <noundry-chart-series key="expenses" label="Expenses" color="red" />
</noundry-chart>

Area Chart

Area charts with gradient fills for showing volume or magnitude over time.

Revenue & Expenses

Filled area comparison

Profit Area

View Code
<noundry-chart
    type="area"
    title="Revenue & Expenses"
    x-axis="month"
    items="@Model.RevenueData">
    <noundry-chart-series key="revenue" label="Revenue" color="blue" />
    <noundry-chart-series key="expenses" label="Expenses" color="amber" />
</noundry-chart>

Pie & Donut Charts

Pie and donut charts for showing proportional data. Use label-key and value-key instead of x-axis.

Sales by Category

Total sales distribution

Sales by Category

Donut variant with center total

View Code
<!-- Pie Chart -->
<noundry-chart
    type="pie"
    title="Sales by Category"
    label-key="category"
    value-key="value"
    show-values="true"
    items="@Model.SalesData">
    <noundry-chart-series key="value" color="indigo" />
</noundry-chart>

<!-- Donut Chart -->
<noundry-chart
    type="donut"
    title="Sales by Category"
    label-key="category"
    value-key="value"
    items="@Model.SalesData">
    <noundry-chart-series key="value" color="indigo" />
</noundry-chart>

Radar Chart

Radar (spider) charts for multi-dimensional data comparison.

Skills Assessment

Developer skill scores (0-100)

Data Loading Patterns

1. Server-Side Items

items="@Model.ChartData"

Pass an IEnumerable from your PageModel or Controller. Properties are automatically serialized to camelCase JSON.

2. Inline JSON

data='[{"month":"Jan","revenue":4200}]'

Embed JSON directly in the attribute. Useful for static data or computed JSON via Razor.

3. API Endpoint

api-url="/api/analytics/revenue"

Fetch data from an API endpoint. Shows a loading spinner while fetching and handles errors gracefully.

View Code
<noundry-chart
    type="radar"
    title="Skills Assessment"
    label-key="skill"
    value-key="score"
    items="@Model.SkillData">
    <noundry-chart-series key="score" label="Score" color="indigo" />
</noundry-chart>

API-Loaded Chart

Charts can load data from an API endpoint. The chart shows a loading spinner during fetch and handles errors.

Sales by Category (API)

Data loaded from /api/chart/sales

Weekly Visitors (API)

Data loaded from /api/chart/visitors

View Code
<!-- API-loaded bar chart -->
<noundry-chart
    type="bar"
    title="Sales by Category"
    api-url="/api/chart/sales"
    x-axis="category">
    <noundry-chart-series key="amount" label="Sales ($)" color="violet" />
</noundry-chart>

<!-- API-loaded line chart -->
<noundry-chart
    type="line"
    title="Weekly Visitors"
    api-url="/api/chart/visitors"
    x-axis="week">
    <noundry-chart-series key="visitors" label="Visitors" color="cyan" />
    <noundry-chart-series key="conversions" label="Conversions" color="pink" />
</noundry-chart>

Properties Reference

noundry-chart

Property Type Default Description
typestring"bar"Chart type: bar, line, area, pie, donut, radar
titlestringnullChart title
descriptionstringnullSubtitle/description
itemsIEnumerablenullServer-side data collection
datastringnullInline JSON data
api-urlstringnullAPI endpoint for async data loading
x-axisstringnullProperty name for X axis labels (bar/line/area)
label-keystringnullLabel property (pie/donut/radar)
value-keystringnullValue property (pie/donut/radar)
heightint300Chart height in pixels
show-gridbooltrueShow grid lines
show-legendbooltrueShow color legend
show-tooltipbooltrueEnable hover tooltips
show-valuesboolfalseShow values on chart elements
animatedbooltrueEnable CSS animations
footer-textstringnullFooter metric text

noundry-chart-series

Property Type Default Description
keystringrequiredData property key to plot
labelstringsame as keyDisplay label in legend and tooltips
colorstring"indigo"Color: indigo, emerald, violet, amber, blue, red, pink, cyan, slate

Available Colors

indigo
emerald
violet
amber
blue
red
pink
cyan
slate