+
+@code {
+ private readonly IReadOnlyList data = new List
+ {
+ new AreaChartSeries { Legend = "legend1",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 7000 },
+ new AreaChartDataPoint { X = 25, Y = 9000 },
+ new AreaChartDataPoint { X = 30, Y = 13000 },
+ new AreaChartDataPoint { X = 35, Y = 15000 },
+ new AreaChartDataPoint { X = 40, Y = 11000 },
+ new AreaChartDataPoint { X = 45, Y = 8760 },
+ new AreaChartDataPoint { X = 50, Y = 3500 },
+ new AreaChartDataPoint { X = 55, Y = 20000 },
+ new AreaChartDataPoint { X = 60, Y = 17000 },
+ new AreaChartDataPoint { X = 65, Y = 1000 },
+ new AreaChartDataPoint { X = 70, Y = 12000 },
+ new AreaChartDataPoint { X = 75, Y = 6876 },
+ new AreaChartDataPoint { X = 80, Y = 12000 },
+ new AreaChartDataPoint { X = 85, Y = 7000 },
+ new AreaChartDataPoint { X = 90, Y = 10000 }
+ }
+ },
+ new AreaChartSeries { Legend = "legend2",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 12000 },
+ new AreaChartDataPoint { X = 25, Y = 14000 },
+ new AreaChartDataPoint { X = 30, Y = 18000 },
+ new AreaChartDataPoint { X = 35, Y = 20000 },
+ new AreaChartDataPoint { X = 40, Y = 16000 },
+ new AreaChartDataPoint { X = 45, Y = 13760 },
+ new AreaChartDataPoint { X = 50, Y = 8500 },
+ new AreaChartDataPoint { X = 55, Y = 25000 },
+ new AreaChartDataPoint { X = 60, Y = 22000 },
+ new AreaChartDataPoint { X = 65, Y = 6000 },
+ new AreaChartDataPoint { X = 70, Y = 17000 },
+ new AreaChartDataPoint { X = 75, Y = 11876 },
+ new AreaChartDataPoint { X = 80, Y = 17000 },
+ new AreaChartDataPoint { X = 85, Y = 12000 },
+ new AreaChartDataPoint { X = 90, Y = 15000 }
+ }
+ },
+ new AreaChartSeries { Legend = "legend3",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 14000 },
+ new AreaChartDataPoint { X = 25, Y = 16000 },
+ new AreaChartDataPoint { X = 30, Y = 20000 },
+ new AreaChartDataPoint { X = 35, Y = 22000 },
+ new AreaChartDataPoint { X = 40, Y = 18000 },
+ new AreaChartDataPoint { X = 45, Y = 15760 },
+ new AreaChartDataPoint { X = 50, Y = 10500 },
+ new AreaChartDataPoint { X = 55, Y = 27000 },
+ new AreaChartDataPoint { X = 60, Y = 24000 },
+ new AreaChartDataPoint { X = 65, Y = 8000 },
+ new AreaChartDataPoint { X = 70, Y = 19000 },
+ new AreaChartDataPoint { X = 75, Y = 13876 },
+ new AreaChartDataPoint { X = 80, Y = 19000 },
+ new AreaChartDataPoint { X = 85, Y = 14000 },
+ new AreaChartDataPoint { X = 90, Y = 17000 }
+ }
+ }
+ };
+
+ private int width = 400;
+ private int height = 400;
+ private bool gradient;
+ private bool roundCorners;
+ private bool hideLabels = true;
+ private bool hideLegends;
+ private bool hideTooltips;
+ private bool allowMultipleLegendSelection;
+}
diff --git a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartAllNegativeYValues.razor b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartAllNegativeYValues.razor
new file mode 100644
index 0000000000..abce0111af
--- /dev/null
+++ b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartAllNegativeYValues.razor
@@ -0,0 +1,71 @@
+@using Microsoft.FluentUI.AspNetCore.Components.Charts
+
+
+
+
+@code {
+
+ private readonly IReadOnlyList data = new List
+ {
+ new AreaChartSeries
+ {
+ Legend = "legend1",
+ Color = DataVizPalette.Color4,
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = -9},
+ new AreaChartDataPoint { X = 25, Y = -14},
+ new AreaChartDataPoint { X = 30, Y = -14},
+ new AreaChartDataPoint { X = 35, Y = -23},
+ new AreaChartDataPoint { X = 40, Y = -20},
+ new AreaChartDataPoint { X = 45, Y = -31},
+ new AreaChartDataPoint { X = 50, Y = -29},
+ new AreaChartDataPoint { X = 55, Y = -27},
+ new AreaChartDataPoint { X = 60, Y = -37},
+ new AreaChartDataPoint { X = 65, Y = -51},
+ }
+ },
+ new AreaChartSeries
+ {
+ Legend = "legend2",
+ Color = DataVizPalette.Color5,
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = -21},
+ new AreaChartDataPoint { X = 25, Y = -25},
+ new AreaChartDataPoint { X = 30, Y = -10},
+ new AreaChartDataPoint { X = 35, Y = -10},
+ new AreaChartDataPoint { X = 40, Y = -14},
+ new AreaChartDataPoint { X = 45, Y = -18},
+ new AreaChartDataPoint { X = 50, Y = -9},
+ new AreaChartDataPoint { X = 55, Y = -23},
+ new AreaChartDataPoint { X = 60, Y = -7},
+ new AreaChartDataPoint { X = 65, Y = -55},
+ }
+ },
+ new AreaChartSeries
+ {
+ Legend = "legend3",
+ Color = DataVizPalette.Color6,
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = -30},
+ new AreaChartDataPoint { X = 25, Y = -35},
+ new AreaChartDataPoint { X = 30, Y = -33},
+ new AreaChartDataPoint { X = 35, Y = -40},
+ new AreaChartDataPoint { X = 40, Y = -10},
+ new AreaChartDataPoint { X = 45, Y = -40},
+ new AreaChartDataPoint { X = 50, Y = -34},
+ new AreaChartDataPoint { X = 55, Y = -40},
+ new AreaChartDataPoint { X = 60, Y = -60},
+ new AreaChartDataPoint { X = 65, Y = -40},
+ }
+ }
+ };
+}
diff --git a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartAxisTitles.razor b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartAxisTitles.razor
new file mode 100644
index 0000000000..fd7942467a
--- /dev/null
+++ b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartAxisTitles.razor
@@ -0,0 +1,33 @@
+@using Microsoft.FluentUI.AspNetCore.Components.Charts
+
+
+
+@code {
+ private readonly IReadOnlyList data = new List
+ {
+ new AreaChartSeries
+ {
+ Legend = "legend1",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 7000 },
+ new AreaChartDataPoint { X = 25, Y = 9000 },
+ new AreaChartDataPoint { X = 30, Y = 13000 },
+ }
+ },
+ new AreaChartSeries
+ {
+ Legend = "legend2",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 12000 },
+ new AreaChartDataPoint { X = 25, Y = 14000 },
+ new AreaChartDataPoint { X = 30, Y = 18000 },
+ }
+ }
+ };
+}
diff --git a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartCulture.razor b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartCulture.razor
new file mode 100644
index 0000000000..c18255efec
--- /dev/null
+++ b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartCulture.razor
@@ -0,0 +1,34 @@
+@using Microsoft.FluentUI.AspNetCore.Components.Charts
+
+
+
+@code {
+ private readonly System.Globalization.CultureInfo culture = new("de-DE");
+
+ private readonly IReadOnlyList data = new List
+ {
+ new AreaChartSeries
+ {
+ Legend = "legend1",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = new DateTime(2024, 1, 1), Y = 7000 },
+ new AreaChartDataPoint { X = new DateTime(2024, 2, 1), Y = 13000 },
+ new AreaChartDataPoint { X = new DateTime(2024, 3, 1), Y = 9000 },
+ }
+ },
+ new AreaChartSeries
+ {
+ Legend = "legend2",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = new DateTime(2024, 1, 1), Y = 12000 },
+ new AreaChartDataPoint { X = new DateTime(2024, 2, 1), Y = 18000 },
+ new AreaChartDataPoint { X = new DateTime(2024, 3, 1), Y = 14000 },
+ }
+ }
+ };
+}
diff --git a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartCustomTooltip.razor b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartCustomTooltip.razor
new file mode 100644
index 0000000000..025b6b9440
--- /dev/null
+++ b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartCustomTooltip.razor
@@ -0,0 +1,109 @@
+@using System.Text.Json
+@using Microsoft.FluentUI.AspNetCore.Components.Charts
+
+
+
+ @{
+ var entries = GetTooltipEntries(ctx);
+ }
+
+
+
+
+
+@code {
+ private readonly IReadOnlyList data = new List
+ {
+ new AreaChartSeries
+ {
+ Legend = "legend1",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 7000 },
+ new AreaChartDataPoint { X = 25, Y = 9000 },
+ new AreaChartDataPoint { X = 30, Y = 13000 },
+ }
+ },
+ new AreaChartSeries
+ {
+ Legend = "legend2",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 12000 },
+ new AreaChartDataPoint { X = 25, Y = 14000 },
+ new AreaChartDataPoint { X = 30, Y = 18000 },
+ }
+ }
+ };
+
+ private static IReadOnlyList GetTooltipEntries(CartesianTooltipContext context)
+ {
+ if (string.IsNullOrWhiteSpace(context.RawJson))
+ {
+ return [];
+ }
+
+ try
+ {
+ using var json = JsonDocument.Parse(context.RawJson);
+ if (!json.RootElement.TryGetProperty("entries", out var entriesElement) ||
+ entriesElement.ValueKind != JsonValueKind.Array)
+ {
+ return [];
+ }
+
+ var result = new List();
+ foreach (var item in entriesElement.EnumerateArray())
+ {
+ var legend = item.TryGetProperty("legend", out var legendElement)
+ ? legendElement.GetString()
+ : null;
+ var value = item.TryGetProperty("value", out var valueElement)
+ ? valueElement.GetString()
+ : null;
+ var color = item.TryGetProperty("color", out var colorElement)
+ ? colorElement.GetString()
+ : null;
+
+ if (!string.IsNullOrWhiteSpace(legend) && !string.IsNullOrWhiteSpace(value))
+ {
+ result.Add(new TooltipEntry(legend, value, color ?? string.Empty));
+ }
+ }
+
+ return result;
+ }
+ catch
+ {
+ return [];
+ }
+ }
+
+ private sealed record TooltipEntry(string Legend, string Value, string Color);
+}
diff --git a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartDefault.razor b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartDefault.razor
new file mode 100644
index 0000000000..e15dfbd772
--- /dev/null
+++ b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartDefault.razor
@@ -0,0 +1,82 @@
+@using Microsoft.FluentUI.AspNetCore.Components.Charts
+
+
+
+@code {
+ private readonly IReadOnlyList data = new List
+ {
+
+ new AreaChartSeries { Legend = "legend1",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 7000 },
+ new AreaChartDataPoint { X = 25, Y = 9000 },
+ new AreaChartDataPoint { X = 30, Y = 13000 },
+ new AreaChartDataPoint { X = 35, Y = 15000 },
+ new AreaChartDataPoint { X = 40, Y = 11000 },
+ new AreaChartDataPoint { X = 45, Y = 8760 },
+ new AreaChartDataPoint { X = 50, Y = 3500 },
+ new AreaChartDataPoint { X = 55, Y = 20000 },
+ new AreaChartDataPoint { X = 60, Y = 17000 },
+ new AreaChartDataPoint { X = 65, Y = 1000 },
+ new AreaChartDataPoint { X = 70, Y = 12000 },
+ new AreaChartDataPoint { X = 75, Y = 6876 },
+ new AreaChartDataPoint { X = 80, Y = 12000 },
+ new AreaChartDataPoint { X = 85, Y = 7000 },
+ new AreaChartDataPoint { X = 90, Y = 10000 }
+ }
+ },
+ new AreaChartSeries { Legend = "legend2",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 12000 },
+ new AreaChartDataPoint { X = 25, Y = 14000 },
+ new AreaChartDataPoint { X = 30, Y = 18000 },
+ new AreaChartDataPoint { X = 35, Y = 20000 },
+ new AreaChartDataPoint { X = 40, Y = 16000 },
+ new AreaChartDataPoint { X = 45, Y = 13760 },
+ new AreaChartDataPoint { X = 50, Y = 8500 },
+ new AreaChartDataPoint { X = 55, Y = 25000 },
+ new AreaChartDataPoint { X = 60, Y = 22000 },
+ new AreaChartDataPoint { X = 65, Y = 6000 },
+ new AreaChartDataPoint { X = 70, Y = 17000 },
+ new AreaChartDataPoint { X = 75, Y = 11876 },
+ new AreaChartDataPoint { X = 80, Y = 17000 },
+ new AreaChartDataPoint { X = 85, Y = 12000 },
+ new AreaChartDataPoint { X = 90, Y = 15000 }
+ }
+ },
+ new AreaChartSeries { Legend = "legend3",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 14000 },
+ new AreaChartDataPoint { X = 25, Y = 16000 },
+ new AreaChartDataPoint { X = 30, Y = 20000 },
+ new AreaChartDataPoint { X = 35, Y = 22000 },
+ new AreaChartDataPoint { X = 40, Y = 18000 },
+ new AreaChartDataPoint { X = 45, Y = 15760 },
+ new AreaChartDataPoint { X = 50, Y = 10500 },
+ new AreaChartDataPoint { X = 55, Y = 27000 },
+ new AreaChartDataPoint { X = 60, Y = 24000 },
+ new AreaChartDataPoint { X = 65, Y = 8000 },
+ new AreaChartDataPoint { X = 70, Y = 19000 },
+ new AreaChartDataPoint { X = 75, Y = 13876 },
+ new AreaChartDataPoint { X = 80, Y = 19000 },
+ new AreaChartDataPoint { X = 85, Y = 14000 },
+ new AreaChartDataPoint { X = 90, Y = 17000 }
+ }
+ }
+ };
+}
+
+
+@*
+xaxis-title="Number of days"
+y-axis-title="Variation of stock market prices"
+x-axis-category-order="default"
+hide-tick-overlap
+mode="tonexty"
+secondary-y-axis-title
+*@
diff --git a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartDefaultRTL.razor b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartDefaultRTL.razor
new file mode 100644
index 0000000000..2c0ac8cc01
--- /dev/null
+++ b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartDefaultRTL.razor
@@ -0,0 +1,33 @@
+@using Microsoft.FluentUI.AspNetCore.Components.Charts
+
+
+
+
+
+@code {
+ private readonly IReadOnlyList data = new List
+ {
+ new AreaChartSeries
+ {
+ Legend = "legend1",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 7000 },
+ new AreaChartDataPoint { X = 25, Y = 9000 },
+ new AreaChartDataPoint { X = 30, Y = 13000 },
+ }
+ },
+ new AreaChartSeries
+ {
+ Legend = "legend2",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 12000 },
+ new AreaChartDataPoint { X = 25, Y = 14000 },
+ new AreaChartDataPoint { X = 30, Y = 18000 },
+ }
+ }
+ };
+}
diff --git a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartEnableGradient.razor b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartEnableGradient.razor
new file mode 100644
index 0000000000..935ed051e9
--- /dev/null
+++ b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartEnableGradient.razor
@@ -0,0 +1,32 @@
+@using Microsoft.FluentUI.AspNetCore.Components.Charts
+
+
+
+@code {
+ private readonly IReadOnlyList data = new List
+ {
+ new AreaChartSeries
+ {
+ Legend = "legend1",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 7000 },
+ new AreaChartDataPoint { X = 25, Y = 9000 },
+ new AreaChartDataPoint { X = 30, Y = 13000 },
+ }
+ },
+ new AreaChartSeries
+ {
+ Legend = "legend2",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 12000 },
+ new AreaChartDataPoint { X = 25, Y = 14000 },
+ new AreaChartDataPoint { X = 30, Y = 18000 },
+ }
+ }
+ };
+}
diff --git a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartHideLegends.razor b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartHideLegends.razor
new file mode 100644
index 0000000000..c3302bbe20
--- /dev/null
+++ b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartHideLegends.razor
@@ -0,0 +1,32 @@
+@using Microsoft.FluentUI.AspNetCore.Components.Charts
+
+
+
+@code {
+ private readonly IReadOnlyList data = new List
+ {
+ new AreaChartSeries
+ {
+ Legend = "legend1",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 7000 },
+ new AreaChartDataPoint { X = 25, Y = 9000 },
+ new AreaChartDataPoint { X = 30, Y = 13000 },
+ }
+ },
+ new AreaChartSeries
+ {
+ Legend = "legend2",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 12000 },
+ new AreaChartDataPoint { X = 25, Y = 14000 },
+ new AreaChartDataPoint { X = 30, Y = 18000 },
+ }
+ }
+ };
+}
diff --git a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartHideTooltip.razor b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartHideTooltip.razor
new file mode 100644
index 0000000000..b5cefdb4ba
--- /dev/null
+++ b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartHideTooltip.razor
@@ -0,0 +1,32 @@
+@using Microsoft.FluentUI.AspNetCore.Components.Charts
+
+
+
+@code {
+ private readonly IReadOnlyList data = new List
+ {
+ new AreaChartSeries
+ {
+ Legend = "legend1",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 7000 },
+ new AreaChartDataPoint { X = 25, Y = 9000 },
+ new AreaChartDataPoint { X = 30, Y = 13000 },
+ }
+ },
+ new AreaChartSeries
+ {
+ Legend = "legend2",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 12000 },
+ new AreaChartDataPoint { X = 25, Y = 14000 },
+ new AreaChartDataPoint { X = 30, Y = 18000 },
+ }
+ }
+ };
+}
diff --git a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartLegendListLabel.razor b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartLegendListLabel.razor
new file mode 100644
index 0000000000..73d3944b90
--- /dev/null
+++ b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartLegendListLabel.razor
@@ -0,0 +1,32 @@
+@using Microsoft.FluentUI.AspNetCore.Components.Charts
+
+
+
+@code {
+ private readonly IReadOnlyList data = new List
+ {
+ new AreaChartSeries
+ {
+ Legend = "legend1",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 7000 },
+ new AreaChartDataPoint { X = 25, Y = 9000 },
+ new AreaChartDataPoint { X = 30, Y = 13000 },
+ }
+ },
+ new AreaChartSeries
+ {
+ Legend = "legend2",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 12000 },
+ new AreaChartDataPoint { X = 25, Y = 14000 },
+ new AreaChartDataPoint { X = 30, Y = 18000 },
+ }
+ }
+ };
+}
diff --git a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartMultipleLegendSelection.razor b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartMultipleLegendSelection.razor
new file mode 100644
index 0000000000..9c7ad79494
--- /dev/null
+++ b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartMultipleLegendSelection.razor
@@ -0,0 +1,70 @@
+@using Microsoft.FluentUI.AspNetCore.Components.Charts
+
+
+
+@code {
+
+ private readonly IReadOnlyList data = new List
+ {
+ new AreaChartSeries
+ {
+ Legend = "legend1",
+ Color = DataVizPalette.Color4,
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 9 },
+ new AreaChartDataPoint { X = 25, Y = 14 },
+ new AreaChartDataPoint { X = 30, Y = 14 },
+ new AreaChartDataPoint { X = 35, Y = 23 },
+ new AreaChartDataPoint { X = 40, Y = 20 },
+ new AreaChartDataPoint { X = 45, Y = 31 },
+ new AreaChartDataPoint { X = 50, Y = 29 },
+ new AreaChartDataPoint { X = 55, Y = 27 },
+ new AreaChartDataPoint { X = 60, Y = 37 },
+ new AreaChartDataPoint { X = 65, Y = 51 },
+
+ }
+ },
+ new AreaChartSeries
+ {
+ Legend = "legend2",
+ Color = DataVizPalette.Color5,
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 21 },
+ new AreaChartDataPoint { X = 25, Y = 25 },
+ new AreaChartDataPoint { X = 30, Y = 10 },
+ new AreaChartDataPoint { X = 35, Y = 10 },
+ new AreaChartDataPoint { X = 40, Y = 14 },
+ new AreaChartDataPoint { X = 45, Y = 18 },
+ new AreaChartDataPoint { X = 50, Y = 9 },
+ new AreaChartDataPoint { X = 55, Y = 23 },
+ new AreaChartDataPoint { X = 60, Y = 7 },
+ new AreaChartDataPoint { X = 65, Y = 55 },
+ }
+ },
+ new AreaChartSeries
+ {
+ Legend = "legend3",
+ Color = DataVizPalette.Color6,
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 30 },
+ new AreaChartDataPoint { X = 25, Y = 35 },
+ new AreaChartDataPoint { X = 30, Y = 33 },
+ new AreaChartDataPoint { X = 35, Y = 40 },
+ new AreaChartDataPoint { X = 40, Y = 10 },
+ new AreaChartDataPoint { X = 45, Y = 40 },
+ new AreaChartDataPoint { X = 50, Y = 34 },
+ new AreaChartDataPoint { X = 55, Y = 40 },
+ new AreaChartDataPoint { X = 60, Y = 60 },
+ new AreaChartDataPoint { X = 65, Y = 40 },
+
+ }
+ }
+
+ };
+}
diff --git a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartMultipleSeriesNegativeYValues.razor b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartMultipleSeriesNegativeYValues.razor
new file mode 100644
index 0000000000..ce8e52e222
--- /dev/null
+++ b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartMultipleSeriesNegativeYValues.razor
@@ -0,0 +1,69 @@
+@using Microsoft.FluentUI.AspNetCore.Components.Charts
+
+
+
+
+@code {
+ private readonly IReadOnlyList data = new List
+ {
+ new AreaChartSeries
+ {
+ Legend = "legend1",
+ Color = DataVizPalette.Color4,
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = -9},
+ new AreaChartDataPoint { X = 25, Y = 14},
+ new AreaChartDataPoint { X = 30, Y = -14},
+ new AreaChartDataPoint { X = 35, Y = 23},
+ new AreaChartDataPoint { X = 40, Y = -20},
+ new AreaChartDataPoint { X = 45, Y = 31},
+ new AreaChartDataPoint { X = 50, Y = -29},
+ new AreaChartDataPoint { X = 55, Y = 27},
+ new AreaChartDataPoint { X = 60, Y = -37},
+ new AreaChartDataPoint { X = 65, Y = 51},
+ }
+ },
+ new AreaChartSeries
+ {
+ Legend = "legend2",
+ Color = DataVizPalette.Color5,
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 21},
+ new AreaChartDataPoint { X = 25, Y = -25},
+ new AreaChartDataPoint { X = 30, Y = 10},
+ new AreaChartDataPoint { X = 35, Y = -10},
+ new AreaChartDataPoint { X = 40, Y = 14},
+ new AreaChartDataPoint { X = 45, Y = -18},
+ new AreaChartDataPoint { X = 50, Y = 9},
+ new AreaChartDataPoint { X = 55, Y = -23},
+ new AreaChartDataPoint { X = 60, Y = 7},
+ new AreaChartDataPoint { X = 65, Y = -55},
+ }
+ },
+ new AreaChartSeries
+ {
+ Legend = "legend3",
+ Color = DataVizPalette.Color6,
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 30},
+ new AreaChartDataPoint { X = 25, Y = 35},
+ new AreaChartDataPoint { X = 30, Y = -33},
+ new AreaChartDataPoint { X = 35, Y = 40},
+ new AreaChartDataPoint { X = 40, Y = 10},
+ new AreaChartDataPoint { X = 45, Y = -40},
+ new AreaChartDataPoint { X = 50, Y = 34},
+ new AreaChartDataPoint { X = 55, Y = 40},
+ new AreaChartDataPoint { X = 60, Y = -60},
+ new AreaChartDataPoint { X = 65, Y = 40},
+ }
+ }
+ };
+}
diff --git a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartNegativeYValues.razor b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartNegativeYValues.razor
new file mode 100644
index 0000000000..16bf3a3afe
--- /dev/null
+++ b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartNegativeYValues.razor
@@ -0,0 +1,40 @@
+@using Microsoft.FluentUI.AspNetCore.Components.Charts
+
+
+
+@code {
+ private readonly IReadOnlyList data = new List
+ {
+ new AreaChartSeries
+ {
+ Legend = "legend1",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 7000 },
+ new AreaChartDataPoint { X = 25, Y = -9000 },
+ new AreaChartDataPoint { X = 30, Y = 13000 },
+ new AreaChartDataPoint { X = 35, Y = -15000 },
+ new AreaChartDataPoint { X = 40, Y = 11000 },
+ new AreaChartDataPoint { X = 45, Y = -8760 },
+ new AreaChartDataPoint { X = 50, Y = 3500 },
+ new AreaChartDataPoint { X = 55, Y = -20000 },
+ new AreaChartDataPoint { X = 60, Y = 17000 },
+ new AreaChartDataPoint { X = 65, Y = -1000 },
+ new AreaChartDataPoint { X = 70, Y = 12000 },
+ new AreaChartDataPoint { X = 75, Y = -6876 },
+ new AreaChartDataPoint { X = 80, Y = 12000 },
+ new AreaChartDataPoint { X = 85, Y = -7000 },
+ new AreaChartDataPoint { X = 90, Y = 10000 },
+ new AreaChartDataPoint { X = 95, Y = 12000 },
+ new AreaChartDataPoint { X = 100, Y = 18000 },
+ new AreaChartDataPoint { X = 105, Y = 14000 },
+ }
+ }
+ };
+}
diff --git a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartRoundedCorners.razor b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartRoundedCorners.razor
new file mode 100644
index 0000000000..3fc869334f
--- /dev/null
+++ b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartRoundedCorners.razor
@@ -0,0 +1,32 @@
+@using Microsoft.FluentUI.AspNetCore.Components.Charts
+
+
+
+@code {
+ private readonly IReadOnlyList data = new List
+ {
+ new AreaChartSeries
+ {
+ Legend = "legend1",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 7000 },
+ new AreaChartDataPoint { X = 25, Y = 9000 },
+ new AreaChartDataPoint { X = 30, Y = 13000 },
+ }
+ },
+ new AreaChartSeries
+ {
+ Legend = "legend2",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 12000 },
+ new AreaChartDataPoint { X = 25, Y = 14000 },
+ new AreaChartDataPoint { X = 30, Y = 18000 },
+ }
+ }
+ };
+}
diff --git a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartSecondaryAxis.razor b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartSecondaryAxis.razor
new file mode 100644
index 0000000000..99b7964a48
--- /dev/null
+++ b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartSecondaryAxis.razor
@@ -0,0 +1,60 @@
+@using Microsoft.FluentUI.AspNetCore.Components.Charts
+
+
+
+@code {
+
+ private readonly IReadOnlyList data = new List
+ {
+ new AreaChartSeries
+ {
+ Legend = "Prices",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 7000 },
+ new AreaChartDataPoint { X = 25, Y = 9000 },
+ new AreaChartDataPoint { X = 30, Y = 13000 },
+ new AreaChartDataPoint { X = 35, Y = 15000 },
+ new AreaChartDataPoint { X = 40, Y = 11000 },
+ new AreaChartDataPoint { X = 45, Y = 8760 },
+ new AreaChartDataPoint { X = 50, Y = 3500 },
+ new AreaChartDataPoint { X = 55, Y = 20000 },
+ new AreaChartDataPoint { X = 60, Y = 17000 },
+ new AreaChartDataPoint { X = 65, Y = 1000 },
+ new AreaChartDataPoint { X = 70, Y = 12000 },
+ new AreaChartDataPoint { X = 75, Y = 6876 },
+ new AreaChartDataPoint { X = 80, Y = 12000 },
+ new AreaChartDataPoint { X = 85, Y = 7000 },
+ new AreaChartDataPoint { X = 90, Y = 10000 },
+ }
+ },
+ new AreaChartSeries
+ {
+ Legend = "Gains",
+ UseSecondaryYScale = true,
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 240 },
+ new AreaChartDataPoint { X = 25, Y = 280 },
+ new AreaChartDataPoint { X = 30, Y = 360 },
+ new AreaChartDataPoint { X = 35, Y = 400 },
+ new AreaChartDataPoint { X = 40, Y = 320 },
+ new AreaChartDataPoint { X = 45, Y = 275 },
+ new AreaChartDataPoint { X = 50, Y = 170 },
+ new AreaChartDataPoint { X = 55, Y = 500 },
+ new AreaChartDataPoint { X = 60, Y = 440 },
+ new AreaChartDataPoint { X = 65, Y = 120 },
+ new AreaChartDataPoint { X = 70, Y = 340 },
+ new AreaChartDataPoint { X = 75, Y = 238 },
+ new AreaChartDataPoint { X = 80, Y = 340 },
+ new AreaChartDataPoint { X = 85, Y = 240 },
+ new AreaChartDataPoint { X = 90, Y = 300 },
+ }
+ }
+ };
+}
diff --git a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartSizing.razor b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartSizing.razor
new file mode 100644
index 0000000000..8ee8afe860
--- /dev/null
+++ b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartSizing.razor
@@ -0,0 +1,40 @@
+@using Microsoft.FluentUI.AspNetCore.Components.Charts
+
+
+
+
+
+
+
+
+@code {
+ private int _width = 700;
+ private int _height = 400;
+
+ private readonly IReadOnlyList data = new List
+ {
+ new AreaChartSeries
+ {
+ Legend = "legend1",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 7000 },
+ new AreaChartDataPoint { X = 25, Y = 9000 },
+ new AreaChartDataPoint { X = 30, Y = 13000 },
+ }
+ },
+ new AreaChartSeries
+ {
+ Legend = "legend2",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 12000 },
+ new AreaChartDataPoint { X = 25, Y = 14000 },
+ new AreaChartDataPoint { X = 30, Y = 18000 },
+ }
+ }
+ };
+}
diff --git a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartZeroYValues.razor b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartZeroYValues.razor
new file mode 100644
index 0000000000..7f568be244
--- /dev/null
+++ b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/AreaChart/AreaChartZeroYValues.razor
@@ -0,0 +1,83 @@
+@using Microsoft.FluentUI.AspNetCore.Components.Charts
+
+
+
+
+@code {
+ private readonly IReadOnlyList data = new List
+ {
+ new AreaChartSeries
+ {
+ Legend = "legend1",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 7000 },
+ new AreaChartDataPoint { X = 25, Y = 9000 },
+ new AreaChartDataPoint { X = 30, Y = 13000 },
+ new AreaChartDataPoint { X = 35, Y = 15000 },
+ new AreaChartDataPoint { X = 40, Y = 11000 },
+ new AreaChartDataPoint { X = 45, Y = 8760 },
+ new AreaChartDataPoint { X = 50, Y = 3500 },
+ new AreaChartDataPoint { X = 55, Y = 20000 },
+ new AreaChartDataPoint { X = 60, Y = 17000 },
+ new AreaChartDataPoint { X = 65, Y = 1000 },
+ new AreaChartDataPoint { X = 70, Y = 12000 },
+ new AreaChartDataPoint { X = 75, Y = 6876 },
+ new AreaChartDataPoint { X = 80, Y = 12000 },
+ new AreaChartDataPoint { X = 85, Y = 7000 },
+ new AreaChartDataPoint { X = 90, Y = 10000 }
+ }
+ },
+ new AreaChartSeries
+ {
+ Legend = "legend2",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 12000 },
+ new AreaChartDataPoint { X = 25, Y = 14000 },
+ new AreaChartDataPoint { X = 30, Y = 18000 },
+ new AreaChartDataPoint { X = 35, Y = 20000 },
+ new AreaChartDataPoint { X = 40, Y = 16000 },
+ new AreaChartDataPoint { X = 45, Y = 13760 },
+ new AreaChartDataPoint { X = 50, Y = 8500 },
+ new AreaChartDataPoint { X = 55, Y = 25000 },
+ new AreaChartDataPoint { X = 60, Y = 22000 },
+ new AreaChartDataPoint { X = 65, Y = 6000 },
+ new AreaChartDataPoint { X = 70, Y = 17000 },
+ new AreaChartDataPoint { X = 75, Y = 11876 },
+ new AreaChartDataPoint { X = 80, Y = 17000 },
+ new AreaChartDataPoint { X = 85, Y = 12000 },
+ new AreaChartDataPoint { X = 90, Y = 15000 }
+ }
+ },
+ new AreaChartSeries
+ {
+ Legend = "legend3",
+ ChartData = new List
+ {
+ new AreaChartDataPoint { X = 20, Y = 14000 },
+ new AreaChartDataPoint { X = 25, Y = 16000 },
+ new AreaChartDataPoint { X = 30, Y = 20000 },
+ new AreaChartDataPoint { X = 35, Y = 22000 },
+ new AreaChartDataPoint { X = 40, Y = 18000 },
+ new AreaChartDataPoint { X = 45, Y = 15760 },
+ new AreaChartDataPoint { X = 50, Y = 10500 },
+ new AreaChartDataPoint { X = 55, Y = 27000 },
+ new AreaChartDataPoint { X = 60, Y = 24000 },
+ new AreaChartDataPoint { X = 65, Y = 8000 },
+ new AreaChartDataPoint { X = 70, Y = 19000 },
+ new AreaChartDataPoint { X = 75, Y = 13876 },
+ new AreaChartDataPoint { X = 80, Y = 19000 },
+ new AreaChartDataPoint { X = 85, Y = 14000 },
+ new AreaChartDataPoint { X = 90, Y = 17000 }
+ }
+ }
+ };
+}
diff --git a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/DonutChart/DonutChartOutsideLabels.razor b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/DonutChart/DonutChartOutsideLabels.razor
deleted file mode 100644
index c60ceb7b2c..0000000000
--- a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/DonutChart/DonutChartOutsideLabels.razor
+++ /dev/null
@@ -1,17 +0,0 @@
-@using Microsoft.FluentUI.AspNetCore.Components.Charts
-
-
-
-@code {
- private readonly IReadOnlyList data = new List
- {
- new DonutDataPoint { Legend = "first", Data = 20000 },
- new DonutDataPoint { Legend = "second", Data = 39000 }
- };
-}
diff --git a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/DonutChart/DonutChartSizing.razor b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/DonutChart/DonutChartSizing.razor
index f3d5a1e090..6d11d0d1fd 100644
--- a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/DonutChart/DonutChartSizing.razor
+++ b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Examples/DonutChart/DonutChartSizing.razor
@@ -15,9 +15,9 @@
@code {
- private int _width = 320;
- private int _height = 320;
- private int _innerRadius = 55;
+ private int _width = 300;
+ private int _height = 300;
+ private int _innerRadius = 100;
private readonly IReadOnlyList data = new List
{
diff --git a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Pages/FluentAreaChartPage.md b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Pages/FluentAreaChartPage.md
new file mode 100644
index 0000000000..c1df8abdfb
--- /dev/null
+++ b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Pages/FluentAreaChartPage.md
@@ -0,0 +1,169 @@
+---
+title: Area Chart
+route: /Charts/AreaChart
+---
+
+# Area Chart
+
+Area charts are graphical representations of data that display quantitative data points connected by lines and filled with colors to create a visual representation of trends and patterns. The area between the line and the x-axis is colored, which helps in emphasizing the cumulative total or the overall magnitude of the data. They are a slight variation of single line charts, and generally can be used interchangeably.
+
+Stacked area charts are great at communicating how multiple data series relate to the total value. It illustrates how each series compares to the other in their contributions to the total. The baseline is moving in stacked area charts, rather than sharing a common baseline in overlapping areas.
+
+## Layout
+
+Padding on the left and right of the chart is determined by the x-axis labels - it should start and end at or close to the first and last tick mark. The minimum padding is 8px.
+
+Area charts support both stacked (`mode="tonexty"`) and non-stacked (`mode="tozeroy"`) fill modes.
+
+## Content
+
+- Area line An area line represents a set of values from the same data set. Each line takes on a new swatch in the data visualization library to distinguish it from others. 2px wide. There is no rounding of joints to avoid data misrepresentation.
+- Area fill Uses the same color family as the area line, but applies a 50% opacity. Note: the implemented stacked area components use transparency fills, but we cannot apply transparency in the Figma guidance
+
+## Accessibility
+
+Users "Enter" into the graph and can use both arrow and tab keys to navigate through.
+The first tab stop will stop on the graph and give a description of what type of graph it is.
+Each section of the graph is readable via screen readers. The user can navigate through the entire area plot by using Left and Right arrow keys.
+
+## Interaction
+
+The area chart is a highly performant visual. It uses a path-based rendering mechanism to render the area component. On hovering, the nearest x datapoint is identified and the corresponding point is hovered.
+
+## Customizing the chart
+
+Stacked area chart In stacked area chart, two or more data series are stacked vertically. It helps in easy comparison across different dimensions. The callout on hover for stacked chart displays multiple values from the stack. The callout can be customized to show single values or stacked values. Refer to the props onRenderCalloutPerDataPoint and onRenderCalloutPerStack using which custom content for the callout can be defined.
+Custom accessibility Area chart provides a bunch of props to enable custom accessibility messages. Use xAxisCalloutAccessibilityData and callOutAccessibilityData to configure x axis and y axis accessibility messages, respectively.
+
+## Axis localization
+
+The chart axes support 2 ways of localization.
+
+1) JavaScript provided inbuilt localization for numeric and date axis. Specify the culture and dateLocalizeOptions for date axis to define target localization. Refer the Javascript localization guide for usage.
+2) Custom locale definition: The consumer of the library can specify a custom locale definition as supported by d3 like this. The date axis will use the date range and the multiformat specified in the definition to determine the correct labels to show in the ticks. For example - If the date range is in days, then the axis will show hourly ticks. If the date range spans across months, then the axis will show months in tick labels and so on. Specify the custom locale definition in the timeFormatLocale prop. Refer to the Custom Locale Date Axis example in line chart for sample usage.
+
+## Do's
+
+- Remain consistent with one chart style if there are multiple instances of it on a page rather than using area and line charts interchangeably.
+
+## Dont's
+
+- Prefer line charts to plot trends.
+- No more than 9 lines on a chart; fewer are better.
+- Do not remove axis titles unless it is clear to the user what is being visualized.
+
+## Examples
+
+### Basic example
+
+The default example renders an area chart with 3 data series and a legend showing each category's data value.
+
+{{ AreaChartDefault }}
+
+### Multiple legend selection
+
+When `AllowMultipleLegendSelection` is enabled, multiple legend items can be selected at the same time.
+
+{{ AreaChartMultipleLegendSelection }}
+
+### Enable gradient
+
+Setting `EnableGradient` applies a gradient fill to the area series.
+
+{{ AreaChartEnableGradient }}
+
+### Negative Y values
+
+This example demonstrates how to handle negative values in the area chart. The area fill will extend below the x-axis for negative values.
+
+{{ AreaChartNegativeYValues }}
+
+### Multiple Series Negative Y values
+
+This example demonstrates how to handle multiple series with negative values in the area chart. The area fill will extend below the x-axis for negative values.
+
+{{ AreaChartMultipleSeriesNegativeYValues }}
+
+### All negative Y values
+
+This example demonstrates how to handle all negative values in the area chart. The area fill will extend below the x-axis for negative values.
+
+{{ AreaChartAllNegativeYValues }}
+
+### Zero Y (Non stacked)
+
+Non-stacked mode: each series fills independently from y=0 (equivalent to React's mode="tozeroy").
+
+{{ AreaChartZeroYValues }}
+
+### Secondary axis
+
+Use `UseSecondaryYScale` on a series and configure the secondary axis visibility and label width.
+
+{{ AreaChartSecondaryAxis }}
+
+### Hide legend
+
+This example removes the legend list below the chart.
+
+{{ AreaChartHideLegends }}
+
+### Culture
+
+This example uses a specific culture to format the axis labels and tooltips.
+
+{{ AreaChartCulture }}
+
+### Rounded corners
+
+Enabling `RoundedCorners` applies a softer visual style to the legend indicators.
+
+{{ AreaChartRoundedCorners }}
+
+### With custom sizing
+
+Use the sliders to adjust the chart width and height at runtime.
+
+{{ AreaChartSizing }}
+
+### Hide tooltip
+
+Setting `HideTooltip` disables the hover callout.
+
+{{ AreaChartHideTooltip }}
+
+### Legend list label
+
+The `LegendListLabel` property sets the accessible heading for the legend list.
+
+{{ AreaChartLegendListLabel }}
+
+### Custom tooltip
+
+Use `CartesianTooltipTemplate` (or `TooltipTemplate`) to replace the default hover callout with custom Blazor markup.
+
+{{ AreaChartCustomTooltip }}
+
+### Axis titles
+
+The `XAxisTitle` and `YAxisTitle` properties label the chart axes.
+
+{{ AreaChartAxisTitles }}
+
+### RTL
+
+This example demonstrates the chart inside a right-to-left container.
+
+{{ AreaChartDefaultRTL }}
+
+## API Fluent Area Chart
+
+{{ API Type=FluentAreaChart }}
+
+## API Area Chart Data
+
+{{ API Type=AreaChartSeries Properties=All }}
+
+## API Area Chart Data Point
+
+{{ API Type=AreaChartDataPoint Properties=All }}
diff --git a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Pages/FluentDonutChartPage.md b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Pages/FluentDonutChartPage.md
index 38b5c3b329..fc6008f431 100644
--- a/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Pages/FluentDonutChartPage.md
+++ b/examples/Demo/FluentUI.Demo.Client/Documentation/Components/Charts/Pages/FluentDonutChartPage.md
@@ -70,17 +70,17 @@ Enabling `RoundedCorners` applies a small border-radius to each segment arc, giv
{{ DonutChartRoundedCorners }}
-### With custom sizing
+### Value inside donut
-Use the sliders to adjust the chart's `Width`, `Height`, and `InnerRadius` at runtime, demonstrating how the donut ring scales with the available space.
+The `ValueInsideDonut` property sets the text displayed in the center of the ring; use the text input to change the value and see the chart update in real time.
-{{ DonutChartSizing }}
+{{ DonutChartValueInsideDonut }}
-### Outside labels
+### With custom sizing
-Enabling `ShowOutsideLabels` moves each segment's label outside the ring, avoiding overlap for charts with many small segments.
+Use the sliders to adjust the chart's `Width`, `Height`, and `InnerRadius` at runtime, demonstrating how the donut ring scales with the available space.
-{{ DonutChartOutsideLabels }}
+{{ DonutChartSizing }}
### Hide tooltip
@@ -106,12 +106,6 @@ When `AllowMultipleLegendSelection` is enabled, clicking a legend item highlight
{{ DonutChartMultipleLegendSelection }}
-### Value inside donut
-
-The `ValueInsideDonut` property sets the text displayed in the center of the ring; use the text input to change the value and see the chart update in real time.
-
-{{ DonutChartValueInsideDonut }}
-
### RTL
Demonstrates the right-to-left layout mode, where segment labels and the legend are mirrored for RTL language support.
diff --git a/examples/Demo/FluentUI.Demo/Program.cs b/examples/Demo/FluentUI.Demo/Program.cs
index 1802348295..f6ce094e4c 100644
--- a/examples/Demo/FluentUI.Demo/Program.cs
+++ b/examples/Demo/FluentUI.Demo/Program.cs
@@ -4,6 +4,7 @@
using FluentUI.Demo.Client;
using Microsoft.FluentUI.AspNetCore.Components;
+using Microsoft.FluentUI.AspNetCore.Components.Charts;
var builder = WebApplication.CreateBuilder(args);
@@ -27,6 +28,7 @@
// config.DefaultValues.ForAny>().Set(p => p.Width, "100%");
// config.DefaultValues.ForAny>().Set(p => p.Multiple, false);
+ config.DefaultValues.ForAny().Set(p => p.RoundedCorners, true);
// Use a custom localizer
config.Localizer = new FluentUI.Demo.MyLocalizer();
});
diff --git a/src/Charts.Scripts/package-lock.json b/src/Charts.Scripts/package-lock.json
index 7c899ba9b7..2acb46d8cb 100644
--- a/src/Charts.Scripts/package-lock.json
+++ b/src/Charts.Scripts/package-lock.json
@@ -10,6 +10,7 @@
"@fluentui/web-components": "^3.0.0",
"@microsoft/fast-element": "^3.0.1",
"@microsoft/fast-web-utilities": "^6.0.0",
+ "d3-axis": "3.0.0",
"d3-format": "^3.0.0",
"d3-scale": "^4.0.0",
"d3-selection": "^3.0.0",
@@ -17,6 +18,7 @@
"d3-time-format": "^4.1.0"
},
"devDependencies": {
+ "@types/d3-axis": "3.0.6",
"@types/d3-format": "^3.0.0",
"@types/d3-scale": "^4.0.0",
"@types/d3-selection": "^3.0.0",
@@ -527,6 +529,16 @@
"tslib": "^2.8.0"
}
},
+ "node_modules/@types/d3-axis": {
+ "version": "3.0.6",
+ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/d3-axis/-/d3-axis-3.0.6.tgz",
+ "integrity": "sha1-52DldluBiLHe+jK8i7YGL4Hkx5U=",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/d3-selection": "*"
+ }
+ },
"node_modules/@types/d3-format": {
"version": "3.0.4",
"resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@types/d3-format/-/d3-format-3.0.4.tgz",
@@ -629,6 +641,15 @@
"node": ">=12"
}
},
+ "node_modules/d3-axis": {
+ "version": "3.0.0",
+ "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/d3-axis/-/d3-axis-3.0.0.tgz",
+ "integrity": "sha1-xCpKE+gTHWN7dF/Clzgkz+r5MyI=",
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
+ }
+ },
"node_modules/d3-color": {
"version": "3.1.0",
"resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/d3-color/-/d3-color-3.1.0.tgz",
diff --git a/src/Charts.Scripts/package.json b/src/Charts.Scripts/package.json
index 6ff238acd2..7d561ac626 100644
--- a/src/Charts.Scripts/package.json
+++ b/src/Charts.Scripts/package.json
@@ -25,6 +25,8 @@
"@types/d3-shape": "^3.0.0",
"@types/d3-scale": "^4.0.0",
"@types/d3-time-format": "^4.0.3",
+ "@types/d3-axis": "^3.0.6",
+ "@types/d3-array": "^3.2.2",
"esbuild": "0.28.1",
"esbuild-plugin-inline-css": "0.0.1",
"glob": "^13.0.6",
@@ -38,6 +40,8 @@
"d3-selection": "^3.0.0",
"d3-shape": "^3.0.0",
"d3-scale": "^4.0.0",
- "d3-time-format": "^4.1.0"
+ "d3-time-format": "^4.1.0",
+ "d3-axis": "^3.0.0",
+ "d3-array": "^3.2.4"
}
}
diff --git a/src/Charts.Scripts/src/FluentUIChartComponents.ts b/src/Charts.Scripts/src/FluentUIChartComponents.ts
index c30f9194f3..b414cc11a6 100644
--- a/src/Charts.Scripts/src/FluentUIChartComponents.ts
+++ b/src/Charts.Scripts/src/FluentUIChartComponents.ts
@@ -5,6 +5,10 @@ export namespace Microsoft.FluentUI.Blazor.FluentUIChartComponents {
export function defineComponents() {
// Register Chart Web Components
+ defineOnce('fluentui:chart-components:area-chart', () => {
+ FluentUIComponents.AreaChart.define(FluentUIComponents.AreaChartDefinition);
+ });
+
defineOnce('fluentui:chart-components:chart-legend', () => {
FluentUIComponents.ChartLegend.define(FluentUIComponents.ChartLegendDefinition);
});
diff --git a/src/Charts.Scripts/src/area-chart/area-chart.definition.ts b/src/Charts.Scripts/src/area-chart/area-chart.definition.ts
new file mode 100644
index 0000000000..98ffbf698b
--- /dev/null
+++ b/src/Charts.Scripts/src/area-chart/area-chart.definition.ts
@@ -0,0 +1,19 @@
+import { FluentDesignSystem } from '@fluentui/web-components';
+import { type PartialFASTElementDefinition } from '@microsoft/fast-element';
+import { styles } from './area-chart.styles.js';
+import { template } from './area-chart.template.js';
+
+/**
+ * @public
+ * @remarks
+ * HTML Element: ``
+ */
+export const definition: PartialFASTElementDefinition = {
+ name: `${FluentDesignSystem.prefix}-area-chart`,
+ registry: FluentDesignSystem.registry,
+ template,
+ styles,
+ shadowOptions: {
+ delegatesFocus: true,
+ },
+};
diff --git a/src/Charts.Scripts/src/area-chart/area-chart.options.ts b/src/Charts.Scripts/src/area-chart/area-chart.options.ts
new file mode 100644
index 0000000000..05919df25e
--- /dev/null
+++ b/src/Charts.Scripts/src/area-chart/area-chart.options.ts
@@ -0,0 +1,32 @@
+import type { AccessibilityData } from '../utils/chart-options.js';
+
+/** @public */
+export interface AreaChartDataPoint {
+ /** @public */ x: number | Date;
+ /** @public */ y: number;
+ /** Custom aria-label for the x-axis callout when hovering this data point. */
+ xAxisCalloutAccessibilityData?: AccessibilityData;
+ /** Custom aria-label for the series callout entry when hovering this data point. */
+ callOutAccessibilityData?: AccessibilityData;
+}
+
+/** @public */
+export interface AreaChartSeries {
+ /** @public */ legend: string;
+ /** @public */ data: AreaChartDataPoint[];
+ /** @public */ color?: string;
+ /**
+ * When true this series is plotted against the right-hand secondary Y axis rather than
+ * the primary (left) Y axis. The secondary axis has its own independent scale.
+ * @public
+ */
+ useSecondaryYScale?: boolean;
+}
+
+/**
+ * Controls how the area fill is computed.
+ * - `'tonexty'` (default): Stacked — each area fills from the top of the previous series' line up to its own line.
+ * - `'tozeroy'`: Non-stacked — each area fills independently from y=0 to its own line.
+ * @public
+ */
+export type AreaChartMode = 'tonexty' | 'tozeroy';
diff --git a/src/Charts.Scripts/src/area-chart/area-chart.styles.ts b/src/Charts.Scripts/src/area-chart/area-chart.styles.ts
new file mode 100644
index 0000000000..127aced6fa
--- /dev/null
+++ b/src/Charts.Scripts/src/area-chart/area-chart.styles.ts
@@ -0,0 +1,225 @@
+import type { ElementStyles } from '@microsoft/fast-element';
+import { css } from '@microsoft/fast-element';
+import {
+ colorNeutralForeground1,
+ colorNeutralForeground2,
+ colorNeutralStroke1,
+ display,
+ fontSizeBase500,
+ shadow4,
+ spacingHorizontalS,
+ spacingVerticalXS,
+ strokeWidthThick,
+ strokeWidthThickest,
+ typographyBody1StrongStyles,
+ typographyCaption1Styles,
+ typographySubtitle2StrongerStyles,
+} from '@fluentui/web-components';
+import { tooltipBaseStyles } from '../utils/tooltip.styles.js';
+
+export const styles: ElementStyles = css`
+ ${display('block')}
+
+ :host {
+ display: grid;
+ grid-template-areas:
+ 'title'
+ 'chart'
+ 'legend';
+ grid-template-columns: 1fr;
+ grid-template-rows: auto 1fr auto;
+ position: relative;
+ width: 100%;
+ }
+
+ .chart-title {
+ grid-area: title;
+ margin-bottom: 8px;
+ ${typographyBody1StrongStyles}
+ text-align: start;
+ }
+
+ .chart-container {
+ grid-area: chart;
+ min-width: 0;
+ }
+
+ fluent-chart-legend {
+ grid-area: legend;
+ }
+
+ :host([title-position='bottom']) {
+ grid-template-areas:
+ 'chart'
+ 'legend'
+ 'title';
+ }
+
+ :host([title-position='bottom']) .chart-title {
+ margin-bottom: 0;
+ margin-top: 8px;
+ }
+
+ :host([legend-position='top']) {
+ grid-template-areas:
+ 'title'
+ 'legend'
+ 'chart';
+ }
+
+ :host([legend-position='start']) {
+ grid-template-areas:
+ 'title title'
+ 'legend chart';
+ grid-template-columns: auto 1fr;
+ }
+
+ :host([legend-position='end']) {
+ grid-template-areas:
+ 'title title'
+ 'chart legend';
+ grid-template-columns: 1fr auto;
+ }
+
+ :host([legend-position='start']) fluent-chart-legend,
+ :host([legend-position='end']) fluent-chart-legend {
+ align-self: start;
+ }
+
+ :host([title-position='bottom'][legend-position='top']) {
+ grid-template-areas:
+ 'legend'
+ 'chart'
+ 'title';
+ grid-template-columns: 1fr;
+ }
+
+ :host([title-position='bottom'][legend-position='start']) {
+ grid-template-areas:
+ 'legend chart'
+ 'title title';
+ grid-template-columns: auto 1fr;
+ }
+
+ :host([title-position='bottom'][legend-position='end']) {
+ grid-template-areas:
+ 'chart legend'
+ 'title title';
+ grid-template-columns: 1fr auto;
+ }
+
+ :host([title-align='center']) .chart-title {
+ text-align: center;
+ }
+
+ :host([title-align='end']) .chart-title {
+ text-align: end;
+ }
+
+ .chart-svg {
+ display: block;
+ overflow: visible;
+ }
+
+ .axis-domain,
+ .origin-line {
+ stroke: ${colorNeutralStroke1};
+ stroke-width: 1;
+ opacity: 0.2;
+ }
+
+ .axis-tick-line {
+ stroke: ${colorNeutralForeground1};
+ stroke-width: 1;
+ opacity: 0.24;
+ }
+
+ .y-axis-grid-line {
+ stroke: ${colorNeutralForeground1};
+ stroke-width: 1;
+ opacity: 0.2;
+ pointer-events: none;
+ }
+
+ .axis-text,
+ .y-axis-text,
+ .x-axis-title,
+ .y-axis-title {
+ ${typographyCaption1Styles}
+ fill: ${colorNeutralForeground2};
+ font-size: 10px;
+ font-weight: 600;
+ }
+
+ .area-line {
+ fill: none;
+ stroke-width: 3;
+ }
+
+ .area-line.multi-series {
+ opacity: 0.3;
+ }
+
+ .area-line.hovered {
+ stroke-width: 3;
+ opacity: 1;
+ }
+
+ .area-path.inactive,
+ .area-line.inactive {
+ opacity: 0.1;
+ }
+
+ .hover-line {
+ stroke: ${colorNeutralStroke1};
+ stroke-width: 1;
+ stroke-dasharray: 5 3;
+ pointer-events: none;
+ }
+
+ .hover-dot {
+ pointer-events: none;
+ }
+
+ ${tooltipBaseStyles}
+
+ .tooltip {
+ ${typographyCaption1Styles}
+ z-index: 999;
+ box-shadow: ${shadow4};
+ border: ${strokeWidthThick};
+ white-space: nowrap;
+ }
+
+ .tooltip-header {
+ ${typographyCaption1Styles}
+ color: ${colorNeutralForeground2};
+ opacity: 0.8;
+ }
+
+ .tooltip-info {
+ margin-top: 11px;
+ padding-inline-start: ${spacingHorizontalS};
+ border-inline-start: ${strokeWidthThickest} solid;
+ }
+
+ .tooltip-legend-text {
+ ${typographyCaption1Styles}
+ color: ${colorNeutralForeground1};
+ text-align: start;
+ margin-bottom: ${spacingVerticalXS};
+ }
+
+ .tooltip-primary-value {
+ ${typographySubtitle2StrongerStyles}
+ font-size: ${fontSizeBase500};
+ direction: ltr;
+ unicode-bidi: isolate;
+ }
+
+ @media (forced-colors: active) {
+ .tooltip-info {
+ forced-color-adjust: none;
+ }
+ }
+`;
diff --git a/src/Charts.Scripts/src/area-chart/area-chart.template.ts b/src/Charts.Scripts/src/area-chart/area-chart.template.ts
new file mode 100644
index 0000000000..0cdb94fd99
--- /dev/null
+++ b/src/Charts.Scripts/src/area-chart/area-chart.template.ts
@@ -0,0 +1,54 @@
+import { ElementViewTemplate, html, ref, repeat, when } from '@microsoft/fast-element';
+import type { AreaChart, TooltipEntry } from './area-chart.js';
+
+export function areaChartTemplate(): ElementViewTemplate {
+ return html`
+
+ ${when(x => !!x.chartTitle, html`
${x => x.chartTitle}
`)}
+
+ x.hideLegends}"
+ :roundBoxes="${x => x.roundCorners}"
+ @legend-click="${(x, c) => x.handleLegendClick((c.event as CustomEvent).detail)}"
+ @legend-mouseover="${(x, c) => x.handleLegendMouseoverAndFocus((c.event as CustomEvent).detail)}"
+ @legend-mouseout="${x => x.handleLegendMouseoutAndBlur()}"
+ @legend-focus="${(x, c) => x.handleLegendFocus((c.event as CustomEvent).detail)}"
+ @legend-blur="${x => x.handleLegendMouseoutAndBlur()}"
+ >
+