{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "chart-cartesian-legend-toggle",
  "framework": "winui",
  "type": "registry:component",
  "component": "Chart",
  "variant": "cartesian-legend-toggle",
  "dependencies": [
    "Syncfusion.Chart.WinUI"
  ],
  "description": "ColumnSeries fruit sales chart with toggleable ChartLegend, animation, tooltips, and a CategoryAxis.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 3 (v35.1.37)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": false,
    "platformIndex": "https://ai.syncfusion.com/winui/llms.txt",
    "skillPack": "syncfusion/winui-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/winui/chart-cartesian-legend-toggle.md"
  },
  "files": [
    {
      "target": "src/components/chart-cartesian-legend-toggle/Chart.xaml",
      "content": "﻿<Page\n    x:Class=\"Chart.Samples.CartesianLegendToggle.Chart\"\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\n    xmlns:chart=\"using:Syncfusion.UI.Xaml.Charts\"\n    xmlns:local=\"using:Chart\">\n\n    <Grid x:Name=\"grid\">\n        <Grid.DataContext>\n            <local:LegendViewModel />\n        </Grid.DataContext>\n        <chart:SfCartesianChart\n            x:Name=\"chart\"\n            Height=\"420\"\n            HorizontalAlignment=\"Center\"\n            Header=\"Comparison of Fruit Sales in a Shop\">\n\n            <chart:SfCartesianChart.Resources>\n                <ResourceDictionary>\n                    <SolidColorBrush x:Key=\"SeriesBrush3\" Color=\"#FFC107\"/>\n                    <SolidColorBrush x:Key=\"SeriesBrush5\" Color=\"#4CAF50\"/>\n                    <SolidColorBrush x:Key=\"SeriesBrush6\" Color=\"#E91E63\"/>\n                    <SolidColorBrush x:Key=\"SeriesBrush7\" Color=\"#FF9800\"/>\n                    <Style TargetType=\"Line\" x:Key=\"axisStyle\">\n                        <Setter Property=\"StrokeThickness\" Value=\"0\"/>\n                        <Setter Property=\"Stroke\" Value=\"Transparent\"/>\n                    </Style>\n                </ResourceDictionary>\n            </chart:SfCartesianChart.Resources>\n\n            <chart:SfCartesianChart.XAxes>\n                <chart:CategoryAxis Interval=\"2\" ShowMajorGridLines=\"False\" EdgeLabelsDrawingMode=\"Shift\" />\n            </chart:SfCartesianChart.XAxes>\n\n            <chart:SfCartesianChart.YAxes>\n                <chart:NumericalAxis\n                    Maximum=\"1\" AxisLineStyle=\"{StaticResource axisStyle}\" MajorTickStyle=\"{StaticResource axisStyle}\"\n                    Minimum=\"0\"\n                    Interval=\"1\">\n                    <chart:NumericalAxis.LabelStyle>\n                        <chart:LabelStyle LabelFormat=\"0'B\"  FontSize=\"12.5\"/>\n                    </chart:NumericalAxis.LabelStyle>\n                </chart:NumericalAxis>\n            </chart:SfCartesianChart.YAxes>\n\n            <chart:SfCartesianChart.Legend>\n                <chart:ChartLegend IconHeight=\"13\" IconWidth=\"13\" ToggleSeriesVisibility=\"True\" Padding=\"0,0,25,0\"/>\n            </chart:SfCartesianChart.Legend>\n\n            <chart:ColumnSeries\n                Fill=\"{StaticResource SeriesBrush3}\"\n                EnableAnimation=\"True\"\n                ItemsSource=\"{Binding ToggledLegendData}\"\n                Label=\"Apple\"\n                EnableTooltip=\"True\"\n                XBindingPath=\"Name\"\n                YBindingPath=\"Apple\"\n                LegendIcon=\"Circle\"/>\n\n            <chart:ColumnSeries\n                Fill=\"{StaticResource SeriesBrush5}\"\n                EnableAnimation=\"True\"\n                ItemsSource=\"{Binding ToggledLegendData}\"\n                Label=\"Orange\"\n                EnableTooltip=\"True\"\n                XBindingPath=\"Name\"\n                YBindingPath=\"Orange\"\n                LegendIcon=\"Circle\"/>\n\n            <chart:ColumnSeries\n                Fill=\"{StaticResource SeriesBrush7}\"\n                EnableAnimation=\"True\"\n                ItemsSource=\"{Binding ToggledLegendData}\"\n                Label=\"Pear\"\n                EnableTooltip=\"True\"\n                XBindingPath=\"Name\"\n                YBindingPath=\"Pear\"\n                LegendIcon=\"Circle\"/>\n\n            <chart:ColumnSeries\n                Fill=\"{StaticResource SeriesBrush6}\"\n                EnableAnimation=\"True\"\n                ItemsSource=\"{Binding ToggledLegendData}\"\n                Label=\"Others\"\n                EnableTooltip=\"True\"\n                XBindingPath=\"Name\"\n                YBindingPath=\"Others\"\n                LegendIcon=\"Circle\"/>\n\n            <chart:SfCartesianChart.SelectionBehavior>\n                <chart:SeriesSelectionBehavior SelectionBrush=\"Red\"/>\n            </chart:SfCartesianChart.SelectionBehavior>\n\n        </chart:SfCartesianChart>\n    </Grid>\n</Page>"
    }
  ]
}