Lumeo

Bar Chart

Compare discrete categories side-by-side. Ideal for monthly comparisons, ranking, or showing multiple series over the same categories.

Installation

dotnet add package Lumeo.Charts

One-time app setup (AddLumeo(), CSS & JS) is covered in the installation guide.

Usage

@using Lumeo

<BarChart />
Bar chart with 2 series (This Year, Last Year) across 12 categories.
CategoryThis YearLast Year
Jan4120035000
Feb3840031200
Mar5210044800
Apr6180053100
May5730048900
Jun7420062400
Jul6890058700
Aug7250061200
Sep8130069800
Oct8870074300
Nov7940065100
Dec9560082200

Side-by-side grouped bars comparing this year's revenue against last year across twelve months.

Bar chart with 2 series (SaaS, On-Premise) across 12 categories.
CategorySaaSOn-Premise
Jan2840019700
Feb3110017600
Mar3870021400
Apr4230018900
May4580017200
Jun5120016300
Jul5360015800
Aug5890014700
Sep6210013900
Oct6740012800
Nov7180011600
Dec7930010400

Stack two product lines to show combined monthly revenue and relative contribution of each.

Bar chart with 6 categories: Revenue ($K).
CategoryRevenue ($K)
North America184300
Western Europe142700
Asia Pacific211500
Latin America63200
Middle East47800
Africa28900

Horizontal orientation works well for ranking category labels that are too long to fit on a vertical axis.

Bar chart with 2 series (This Year, Last Year) across 12 categories.
CategoryThis YearLast Year
Jan4120035000
Feb3840031200
Mar5210044800
Apr6180053100
May5730048900
Jun7420062400
Jul6890058700
Aug7250061200
Sep8130069800
Oct8870074300
Nov7940065100
Dec9560082200

Combine horizontal layout with stacking to show part-to-whole breakdowns across departments.

Bar chart with 2 series (Actual, Target) across 4 categories.
CategoryActualTarget
Q1142800150000
Q2161300155000
Q3154700160000
Q4178200175000

Display the exact value on top of each bar — useful for presentations where reading specific numbers matters.

Bar chart with 2 series (New Customers, Renewals) across 24 categories.
CategoryNew CustomersRenewals
Jan 24312891
Feb 24287843
Mar 24341912
Apr 24398967
May 244231034
Jun 245121128
Jul 244871087
Aug 245311142
Sep 246041213
Oct 246721289
Nov 245981198
Dec 247411347
Jan 253281024
Feb 25304968
Mar 253671047
Apr 254211103
May 254481171
Jun 255391264
Jul 255131224
Aug 255571278
Sep 256311352
Oct 256981428
Nov 256241334
Dec 257791491

Override the default palette with brand colors and enable the DataZoom slider to scroll through a dense dataset.

Categories: 12
Strategy
Bar chart with 12 categories: Revenue (K).
CategoryRevenue (K)
Jan '2460
Feb '2484.1
Mar '24100.3
Apr '24103.5
May '2493
Jun '2473.1
Jul '2451.3
Aug '2435.6
Sep '2432.2
Oct '2442.6
Nov '2463.8
Dec '2489
Move the slider to see Smart's auto-rotate kick in at 11 / 17 / 25 categories.

Drag the slider to change the number of categories and watch Smart rotate labels as the axis gets crowded.

Bar chart with 2 series (Actual, Target) across 4 categories.
CategoryActualTarget
Q1142800150000
Q2161300155000
Q3154700160000
Q4178200175000

Shape-aware skeleton renders automatically before ECharts mounts and while IsLoading is true — no empty-whitespace flash, no layout shift. Click Simulate to fake a 2-second fetch, or flip the switch to pin the skeleton for inspection.

API Reference

BarChart

Property Type Default Description
Categories List<string> [] X-axis category labels.
Series List<ChartSeriesData> [] Data series with Name and Values.
Horizontal bool false Rotates bars to grow horizontally.
Stacked bool false Stacks series on top of each other.
ShowLegend bool true Shows or hides the chart legend.
ShowTooltip bool true Enables the hover tooltip.
Colors List<string>? null Custom color palette for series.
DataZoom bool false Enables zoom slider for large datasets.
Toolbox bool false Shows save/restore/zoom toolbox.
ShowDataLabels bool false Renders value labels on each bar.
LabelPosition string "top" Label position: "top", "inside", "bottom".
LabelStrategy ChartLabelStrategy Smart How category-axis labels are rendered. Smart auto-rotates at higher densities; ShowAll forces all horizontal; Auto thins overlapping labels.
LabelRotate int? null Manual rotation override in degrees on top of LabelStrategy.
IsLoading bool false When true, renders a shape-matched loading skeleton in place of the chart. Bind to your async fetch state.
ShowLoadingSkeleton bool true Set to false to opt out of the skeleton (chart area stays empty while IsLoading is true).
SkeletonKind ChartSkeletonKind (chart default) Override the skeleton silhouette (Bars, Line, Area, Pie, Scatter, Grid, Generic).
SkeletonStyle ChartSkeletonStyle Phantom Phantom renders the real chart with placeholder data and morphs to real data via ECharts animation. Silhouette falls back to the legacy SVG skeleton overlay.
ShowLoadingLabel bool true Shows a small "Loading…" pill in the top-right corner whenever IsLoading is true. Layered on top of any SkeletonStyle. Set to false for bare visuals. (rc.18)
LoadingText string? "Loading…" Label rendered next to the spinner inside the loading pill. Set to empty to show the spinner alone. (rc.18)
Width string "100%" CSS width of the chart container.
Height string "350px" CSS height of the chart container.
Theme string? null ECharts theme name override; null follows global Lumeo theme.
PhantomCycleMs int 1400 Phantom-mode refresh interval in milliseconds; lower cycles placeholder data faster.
LabelFormat string? null ECharts formatter string applied to bar data labels.
ColorPalette List<string>? null Alternate color palette applied when Colors is unset.
AnimationDuration int? null Override ECharts bar-grow animation duration in milliseconds.
AnimationEasing string? null ECharts easing function name for entry animation.
MarkLine EChartMarkLine? null Reference lines (avg, max, target) overlaid on the bars.
MarkPoint EChartMarkPoint? null Marker points highlighting extrema or annotations on bars.
MarkArea EChartMarkArea? null Shaded regions highlighting value ranges behind the bars.