diff --git a/blazor/chart/chart-annotations.md b/blazor/chart/chart-annotations.md index f3c6085be6..a096cdb234 100644 --- a/blazor/chart/chart-annotations.md +++ b/blazor/chart/chart-annotations.md @@ -1,7 +1,7 @@ --- layout: post title: Annotation in Blazor Charts Component | Syncfusion -description: Checkout and learn here all about using Annotation in Syncfusion Blazor Charts component and much more. +description: Check out and learn how to configure and customize Annotation in Syncfusion Blazor Charts component. platform: Blazor control: Chart documentation: ug @@ -9,21 +9,20 @@ documentation: ug # Annotation in Blazor Charts Component -Annotations are texts, shapes, or images that are used to highlight a specific region of interest in a chart. +Annotations are texts, shapes, or images used to highlight specific regions of interest in a chart. -You can learn how to add annotations to Blazor Charts by watching the video below. +Learn how to add Annotations to Blazor Charts by watching the video below. {% youtube "youtube:https://www.youtube.com/watch?v=TpUoXrYlCkU" %} - The [ChartAnnotations](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartAnnotations.html) property allows to add annotations to the chart. Specify the ID of the element that needs to be displayed in the chart area by using the [Content](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartAnnotation.html#Syncfusion_Blazor_Charts_ChartAnnotation_Content) property of the annotation. +The [ChartAnnotations](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartAnnotations.html) allows annotations to be added to the chart. The [Content](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartAnnotation.html#Syncfusion_Blazor_Charts_ChartAnnotation_Content) property specifies the element to display in the chart area. ```cshtml @using Syncfusion.Blazor.Charts - - + @@ -39,7 +38,7 @@ You can learn how to add annotations to Blazor Charts by watching the video belo -@code{ +@code { string data = "France"; public class ChartData @@ -49,15 +48,15 @@ You can learn how to add annotations to Blazor Charts by watching the video belo } public List MedalDetails = new List - { - new ChartData{ Country= "USA", Gold=50 }, - new ChartData{ Country= "China", Gold=40 }, - new ChartData{ Country= "Japan", Gold=70 }, - new ChartData{ Country= "Australia", Gold=60}, - new ChartData{ Country= "France", Gold=50 }, - new ChartData{ Country= "Germany", Gold=40 }, - new ChartData{ Country= "Italy", Gold=40 }, - new ChartData{ Country= "Sweden", Gold=30 } + { + new ChartData { Country = "USA", Gold = 50 }, + new ChartData { Country = "China", Gold = 40 }, + new ChartData { Country = "Japan", Gold = 70 }, + new ChartData { Country = "Australia", Gold = 60}, + new ChartData { Country = "France", Gold = 50 }, + new ChartData { Country = "Germany", Gold = 40 }, + new ChartData { Country = "Italy", Gold = 40 }, + new ChartData { Country = "Sweden", Gold = 30 } }; } @@ -67,15 +66,14 @@ You can learn how to add annotations to Blazor Charts by watching the video belo ## Region -The [Region](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartAnnotation.html#Syncfusion_Blazor_Charts_ChartAnnotation_Region) property can be used to insert annotations in relation to a series or a chart. By default, it is positioned with respect to a [Chart](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.Regions.html#Syncfusion_Blazor_Charts_Regions_Chart). +Use the [Region](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartAnnotation.html#Syncfusion_Blazor_Charts_ChartAnnotation_Region) property to position annotations relative to a series or the chart. By default, annotations are positioned with respect to the [Chart](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.Regions.html#Syncfusion_Blazor_Charts_Regions_Chart). ```cshtml @using Syncfusion.Blazor.Charts - - + @@ -91,7 +89,7 @@ The [Region](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.Char -@code{ +@code { string Country = "Australia"; public class ChartData @@ -101,15 +99,15 @@ The [Region](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.Char } public List MedalDetails = new List - { - new ChartData{ Country= "USA", Gold=50 }, - new ChartData{ Country= "China", Gold=40 }, - new ChartData{ Country= "Japan", Gold=70 }, - new ChartData{ Country= "Australia", Gold=60}, - new ChartData{ Country= "France", Gold=50 }, - new ChartData{ Country= "Germany", Gold=40 }, - new ChartData{ Country= "Italy", Gold=40 }, - new ChartData{ Country= "Sweden", Gold=30 } + { + new ChartData { Country = "USA", Gold = 50 }, + new ChartData { Country = "China", Gold = 40 }, + new ChartData { Country = "Japan", Gold = 70 }, + new ChartData { Country = "Australia", Gold = 60}, + new ChartData { Country = "France", Gold = 50 }, + new ChartData { Country = "Germany", Gold = 40 }, + new ChartData { Country = "Italy", Gold = 40 }, + new ChartData { Country = "Sweden", Gold = 30 } }; } @@ -117,17 +115,16 @@ The [Region](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.Char ![Inserting Annotations using Region in Blazor Column Chart](images/annotation/blazor-column-chart-annotation-using-region.png) -## Co-ordinate units +## Coordinate units -The [CoordinateUnits](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartAnnotation.html#Syncfusion_Blazor_Charts_ChartAnnotation_CoordinateUnits) property allows to specify the annotation's coordinate units either in [Pixel](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.Units.html#Syncfusion_Blazor_Charts_Units_Pixel) or [Point](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.Units.html#Syncfusion_Blazor_Charts_Units_Point). +Set the annotation's coordinate units using the [CoordinateUnits](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartAnnotation.html#Syncfusion_Blazor_Charts_ChartAnnotation_CoordinateUnits) property. Choose between [Pixel](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.Units.html#Syncfusion_Blazor_Charts_Units_Pixel) or [Point](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.Units.html#Syncfusion_Blazor_Charts_Units_Point). ```cshtml @using Syncfusion.Blazor.Charts - - + @@ -143,7 +140,7 @@ The [CoordinateUnits](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ch -@code{ +@code { public class ChartData { public string Country { get; set; } @@ -151,15 +148,15 @@ The [CoordinateUnits](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Ch } public List MedalDetails = new List - { - new ChartData{ Country= "USA", Gold=50 }, - new ChartData{ Country= "China", Gold=40 }, - new ChartData{ Country= "Japan", Gold=70 }, - new ChartData{ Country= "Australia", Gold=60}, - new ChartData{ Country= "France", Gold=50 }, - new ChartData{ Country= "Germany", Gold=40 }, - new ChartData{ Country= "Italy", Gold=40 }, - new ChartData{ Country= "Sweden", Gold=30 } + { + new ChartData { Country = "USA", Gold = 50 }, + new ChartData { Country = "China", Gold = 40 }, + new ChartData { Country = "Japan", Gold = 70 }, + new ChartData { Country = "Australia", Gold = 60}, + new ChartData { Country = "France", Gold = 50 }, + new ChartData { Country = "Germany", Gold = 40 }, + new ChartData { Country = "Italy", Gold = 40 }, + new ChartData { Country = "Sweden", Gold = 30 } }; } @@ -172,4 +169,4 @@ N> Refer to our [Blazor Charts](https://www.syncfusion.com/blazor-components/bla ## See also * [Tooltip](./tool-tip) -* [Legend](./legend) \ No newline at end of file +* [Legend](./legend) diff --git a/blazor/chart/chart-appearance.md b/blazor/chart/chart-appearance.md index ef00a5ce9f..70961bc519 100644 --- a/blazor/chart/chart-appearance.md +++ b/blazor/chart/chart-appearance.md @@ -1,7 +1,7 @@ --- layout: post title: Appearance in Blazor Charts Component | Syncfusion -description: Checkout and learn here all about Appearance Customization in Syncfusion Blazor Charts component and much more. +description: Check out and learn how to customize Chart Appearance in Syncfusion Blazor Charts component for enhanced visual presentation. platform: Blazor control: Chart documentation: ug @@ -11,15 +11,14 @@ documentation: ug ## Custom color palette -The default color of series or points can be changed by providing a custom color palette to the [Palettes](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.SfChart.html#Syncfusion_Blazor_Charts_SfChart_Palettes) property. +Change the default color of series or points by providing a custom color palette to the [Palettes](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.SfChart.html#Syncfusion_Blazor_Charts_SfChart_Palettes) property. ```cshtml @using Syncfusion.Blazor.Charts - - + @@ -31,7 +30,7 @@ The default color of series or points can be changed by providing a custom color -@code{ +@code { public class ChartData { public string Country { get; set; } @@ -41,15 +40,15 @@ The default color of series or points can be changed by providing a custom color } public List MedalDetails = new List - { - new ChartData{ Country= "USA", Gold=50, Silver=70, Bronze=45 }, - new ChartData{ Country="China", Gold=40, Silver= 60, Bronze=55 }, - new ChartData{ Country= "Japan", Gold=70, Silver= 60, Bronze=50 }, - new ChartData{ Country= "Australia", Gold=60, Silver= 56, Bronze=40 }, - new ChartData{ Country= "France", Gold=50, Silver= 45, Bronze=35 }, - new ChartData{ Country= "Germany", Gold=40, Silver=30, Bronze=22 }, - new ChartData{ Country= "Italy", Gold=40, Silver=35, Bronze=37 }, - new ChartData{ Country= "Sweden", Gold=30, Silver=25, Bronze=27 } + { + new ChartData { Country = "USA", Gold = 50, Silver = 70, Bronze = 45 }, + new ChartData { Country = "China", Gold = 40, Silver = 60, Bronze = 55 }, + new ChartData { Country = "Japan", Gold = 70, Silver = 60, Bronze = 50 }, + new ChartData { Country = "Australia", Gold = 60, Silver = 56, Bronze = 40 }, + new ChartData { Country = "France", Gold = 50, Silver = 45, Bronze = 35 }, + new ChartData { Country = "Germany", Gold = 40, Silver = 30, Bronze = 22 }, + new ChartData { Country = "Italy", Gold = 40, Silver = 35, Bronze = 37 }, + new ChartData { Country = "Sweden", Gold = 30, Silver = 25, Bronze = 27 } }; public String[] palettes = new String[] { "#E94649", "#F6B53F", "#6FAAB0" }; @@ -69,7 +68,7 @@ The default color of series or points can be changed by providing a custom color -The chart's background color can be customized using the [Background](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.SfChart.html#Syncfusion_Blazor_Charts_SfChart_Background) property and the border color and width can be customized based on the specified value in [ChartBorder](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartBorder.html). +Customize the chart's background color using the [Background](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.SfChart.html#Syncfusion_Blazor_Charts_SfChart_Background) property. Adjust border color and width with [ChartBorder](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartBorder.html). ```cshtml @@ -86,7 +85,7 @@ The chart's background color can be customized using the [Background](https://he -@code{ +@code { public class ChartData { public string Country { get; set; } @@ -94,15 +93,15 @@ The chart's background color can be customized using the [Background](https://he } public List MedalDetails = new List - { - new ChartData{ Country= "USA", Gold=50 }, - new ChartData{ Country="China", Gold=40 }, - new ChartData{ Country= "Japan", Gold=70 }, - new ChartData{ Country= "Australia", Gold=60}, - new ChartData{ Country= "France", Gold=50 }, - new ChartData{ Country= "Germany", Gold=40 }, - new ChartData{ Country= "Italy", Gold=40 }, - new ChartData{ Country= "Sweden", Gold=30 } + { + new ChartData { Country = "USA", Gold = 50 }, + new ChartData { Country = "China", Gold = 40 }, + new ChartData { Country = "Japan", Gold = 70 }, + new ChartData { Country = "Australia", Gold = 60 }, + new ChartData { Country = "France", Gold = 50 }, + new ChartData { Country = "Germany", Gold = 40 }, + new ChartData { Country = "Italy", Gold = 40 }, + new ChartData { Country = "Sweden", Gold = 30 } }; } @@ -112,7 +111,7 @@ The chart's background color can be customized using the [Background](https://he ### Chart margin -The chart's margin from its container can be customized using the [ChartMargin](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartMargin.html). +Set the chart margin from its container using the [ChartMargin](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartMargin.html) property. ```cshtml @@ -123,8 +122,7 @@ The chart's margin from its container can be customized using the [ChartMargin]( - - + @@ -132,7 +130,7 @@ The chart's margin from its container can be customized using the [ChartMargin]( -@code{ +@code { public class ChartData { public string Country { get; set; } @@ -140,15 +138,15 @@ The chart's margin from its container can be customized using the [ChartMargin]( } public List MedalDetails = new List - { - new ChartData{ Country= "USA", Gold=50 }, - new ChartData{ Country="China", Gold=40 }, - new ChartData{ Country= "Japan", Gold=70 }, - new ChartData{ Country= "Australia", Gold=60}, - new ChartData{ Country= "France", Gold=50 }, - new ChartData{ Country= "Germany", Gold=40 }, - new ChartData{ Country= "Italy", Gold=40 }, - new ChartData{ Country= "Sweden", Gold=30 } + { + new ChartData { Country = "USA", Gold = 50 }, + new ChartData { Country = "China", Gold = 40 }, + new ChartData { Country = "Japan", Gold = 70 }, + new ChartData { Country = "Australia", Gold = 60 }, + new ChartData { Country = "France", Gold = 50 }, + new ChartData { Country = "Germany", Gold = 40 }, + new ChartData { Country = "Italy", Gold = 40 }, + new ChartData { Country = "Sweden", Gold = 30 } }; } @@ -158,9 +156,7 @@ The chart's margin from its container can be customized using the [ChartMargin]( ### Chart area customization -Using [Background](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartArea.html#Syncfusion_Blazor_Charts_ChartArea_Background) and [ChartAreaBorder](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartAreaBorder.html) properties, you can change the background color and border of the chart area. Width for the chart area can be customized using [Width](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartArea.html#Syncfusion_Blazor_Charts_ChartArea_Width) property. - -Using [Background](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartArea.html#Syncfusion_Blazor_Charts_ChartArea_Background) and [ChartAreaBorder](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartAreaBorder.html) properties, you can change the background color and border of the chart area. Width for the chart area can be customized using [Width](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartArea.html#Syncfusion_Blazor_Charts_ChartArea_Width) property. +Change the background color and border of the chart area using [Background](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartArea.html#Syncfusion_Blazor_Charts_ChartArea_Background) and [ChartAreaBorder](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartAreaBorder.html). Customize the chart area width with the [Width](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartArea.html#Syncfusion_Blazor_Charts_ChartArea_Width) property. ```cshtml @@ -178,7 +174,7 @@ Using [Background](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Chart -@code{ +@code { public class ChartData { public string Country { get; set; } @@ -186,15 +182,15 @@ Using [Background](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Chart } public List MedalDetails = new List - { - new ChartData{ Country= "USA", Gold=50 }, - new ChartData{ Country="China", Gold=40 }, - new ChartData{ Country= "Japan", Gold=70 }, - new ChartData{ Country= "Australia", Gold=60}, - new ChartData{ Country= "France", Gold=50 }, - new ChartData{ Country= "Germany", Gold=40 }, - new ChartData{ Country= "Italy", Gold=40 }, - new ChartData{ Country= "Sweden", Gold=30 } + { + new ChartData { Country = "USA", Gold = 50 }, + new ChartData { Country = "China", Gold = 40 }, + new ChartData { Country = "Japan", Gold = 70 }, + new ChartData { Country = "Australia", Gold = 60 }, + new ChartData { Country = "France", Gold = 50 }, + new ChartData { Country = "Germany", Gold = 40 }, + new ChartData { Country = "Italy", Gold = 40 }, + new ChartData { Country = "Sweden", Gold = 30 } }; } @@ -204,14 +200,14 @@ Using [Background](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Chart ## Animation -The [Animation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartSeries.html#Syncfusion_Blazor_Charts_ChartSeries_Animation) property allows to customize animation for a certain series. The [Enable](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.StockChartCommonAnimation.html#Syncfusion_Blazor_Charts_StockChartCommonAnimation_Enable) property can be used to enable or disable the series animation. The duration of the animation is specified by [Duration](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.StockChartCommonAnimation.html#Syncfusion_Blazor_Charts_StockChartCommonAnimation_Duration) property, and [Delay](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.StockChartCommonAnimation.html#Syncfusion_Blazor_Charts_StockChartCommonAnimation_Delay) property allows to start the animation at a specific moment. +Customize series animation using the [Animation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartSeries.html#Syncfusion_Blazor_Charts_ChartSeries_Animation) property. Enable or disable animation with [Enable](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.StockChartCommonAnimation.html#Syncfusion_Blazor_Charts_StockChartCommonAnimation_Enable), set duration with [Duration](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.StockChartCommonAnimation.html#Syncfusion_Blazor_Charts_StockChartCommonAnimation_Duration), and specify a start delay with [Delay](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.StockChartCommonAnimation.html#Syncfusion_Blazor_Charts_StockChartCommonAnimation_Delay). ```cshtml @using Syncfusion.Blazor.Charts - + @@ -231,7 +227,7 @@ The [Animation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.C } public List MedalDetails = new List - { + { new ChartData{ Country= "USA", Gold=50, Silver=70, Bronze=45 }, new ChartData{ Country="China", Gold=40, Silver= 60, Bronze=55 }, new ChartData{ Country= "Japan", Gold=70, Silver= 60, Bronze=50 }, @@ -247,7 +243,7 @@ The [Animation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.C ## Chart title -The [Title](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.SfChart.html#Syncfusion_Blazor_Charts_SfChart_Title) property can be used to give the chart a title in-order to provide information about the data displayed. +Add a chart title using the [Title](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.SfChart.html#Syncfusion_Blazor_Charts_SfChart_Title) property to provide information about the displayed data. ```cshtml @@ -256,8 +252,7 @@ The [Title](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.SfCha - - + @@ -265,7 +260,7 @@ The [Title](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.SfCha -@code{ +@code { public class ChartData { public string Country { get; set; } @@ -273,15 +268,15 @@ The [Title](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.SfCha } public List MedalDetails = new List - { - new ChartData{ Country= "USA", Gold=50 }, - new ChartData{ Country="China", Gold=40 }, - new ChartData{ Country= "Japan", Gold=70 }, - new ChartData{ Country= "Australia", Gold=60}, - new ChartData{ Country= "France", Gold=50 }, - new ChartData{ Country= "Germany", Gold=40 }, - new ChartData{ Country= "Italy", Gold=40 }, - new ChartData{ Country= "Sweden", Gold=30 } + { + new ChartData { Country = "USA", Gold = 50 }, + new ChartData { Country = "China", Gold = 40 }, + new ChartData { Country = "Japan", Gold = 70 }, + new ChartData { Country = "Australia", Gold = 60 }, + new ChartData { Country = "France", Gold = 50 }, + new ChartData { Country = "Germany", Gold = 40 }, + new ChartData { Country = "Italy", Gold = 40 }, + new ChartData { Country = "Sweden", Gold = 30 } }; } @@ -291,7 +286,7 @@ The [Title](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.SfCha ### Title position -The [Position](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartTitleStyle.html#Syncfusion_Blazor_Charts_ChartTitleStyle_Position) property customizes the placement of the chart title. It supports the following options: [Right](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartTitlePosition.html#Syncfusion_Blazor_Charts_ChartTitlePosition_Right), [Left](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartTitlePosition.html#Syncfusion_Blazor_Charts_ChartTitlePosition_Left), [Bottom](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartTitlePosition.html#Syncfusion_Blazor_Charts_ChartTitlePosition_Bottom), [Top](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartTitlePosition.html#Syncfusion_Blazor_Charts_ChartTitlePosition_Top), and [Custom](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartTitlePosition.html#Syncfusion_Blazor_Charts_ChartTitlePosition_Custom), providing flexible title alignment based on layout requirements. By default, the chart title appears at the top of the chart. +Customize the chart title placement using the [Position](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartTitleStyle.html#Syncfusion_Blazor_Charts_ChartTitleStyle_Position) property. Options include [Right](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartTitlePosition.html#Syncfusion_Blazor_Charts_ChartTitlePosition_Right), [Left](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartTitlePosition.html#Syncfusion_Blazor_Charts_ChartTitlePosition_Left), [Bottom](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartTitlePosition.html#Syncfusion_Blazor_Charts_ChartTitlePosition_Bottom), [Top](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartTitlePosition.html#Syncfusion_Blazor_Charts_ChartTitlePosition_Top), and [Custom](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartTitlePosition.html#Syncfusion_Blazor_Charts_ChartTitlePosition_Custom). By default, the title appears at the **top**. N> The subtitle, which appears below the title, will also be positioned along with the title when the `Position` property is set. @@ -302,8 +297,7 @@ N> The subtitle, which appears below the title, will also be positioned along wi - - + @@ -311,7 +305,7 @@ N> The subtitle, which appears below the title, will also be positioned along wi -@code{ +@code { public class ChartData { public string Country { get; set; } @@ -319,21 +313,22 @@ N> The subtitle, which appears below the title, will also be positioned along wi } public List MedalDetails = new List - { - new ChartData{ Country= "USA", Gold=50 }, - new ChartData{ Country="China", Gold=40 }, - new ChartData{ Country= "Japan", Gold=70 }, - new ChartData{ Country= "Australia", Gold=60}, - new ChartData{ Country= "France", Gold=50 }, - new ChartData{ Country= "Germany", Gold=40 }, - new ChartData{ Country= "Italy", Gold=40 }, - new ChartData{ Country= "Sweden", Gold=30 } + { + new ChartData { Country = "USA", Gold = 50 }, + new ChartData { Country = "China", Gold = 40 }, + new ChartData { Country = "Japan", Gold = 70 }, + new ChartData { Country = "Australia", Gold = 60 }, + new ChartData { Country = "France", Gold = 50 }, + new ChartData { Country = "Germany", Gold = 40 }, + new ChartData { Country = "Italy", Gold = 40 }, + new ChartData { Country = "Sweden", Gold = 30 } }; } ``` +{% previewsample "https://blazorplayground.syncfusion.com/embed/BZLIZEryzUPiuQCS?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %} + ![Position customization of title in Blazor Chart](images/appearance/blazor-chart-title-position.png) -{% previewsample "https://blazorplayground.syncfusion.com/embed/hthIjzjTrISHobHi?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %} When the `Position` is set to `Custom`, the title can be positioned anywhere on the chart using the [X](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartTitleStyle.html#Syncfusion_Blazor_Charts_ChartTitleStyle_X) and [Y](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartTitleStyle.html#Syncfusion_Blazor_Charts_ChartTitleStyle_Y) properties in [ChartTitleStyle](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartTitleStyle.html). This provides precise control over the title’s location, enabling customization to fit specific design or layout needs. The `X` and `Y` values specify the horizontal and vertical coordinates, respectively. @@ -342,7 +337,6 @@ When the `Position` is set to `Custom`, the title can be positioned anywhere on @using Syncfusion.Blazor.Charts - @@ -363,25 +357,26 @@ When the `Position` is set to `Custom`, the title can be positioned anywhere on } public List MedalDetails = new List - { - new ChartData{ Country= "USA", Gold=50 }, - new ChartData{ Country="China", Gold=40 }, - new ChartData{ Country= "Japan", Gold=70 }, - new ChartData{ Country= "Australia", Gold=60}, - new ChartData{ Country= "France", Gold=50 }, - new ChartData{ Country= "Germany", Gold=40 }, - new ChartData{ Country= "Italy", Gold=40 }, - new ChartData{ Country= "Sweden", Gold=30 } + { + new ChartData { Country = "USA", Gold = 50 }, + new ChartData { Country = "China", Gold = 40 }, + new ChartData { Country = "Japan", Gold = 70 }, + new ChartData { Country = "Australia", Gold = 60 }, + new ChartData { Country = "France", Gold = 50 }, + new ChartData { Country = "Germany", Gold = 40 }, + new ChartData { Country = "Italy", Gold = 40 }, + new ChartData { Country = "Sweden", Gold = 30 } }; } ``` +{% previewsample "https://blazorplayground.syncfusion.com/embed/BXrotuVozgajpbhW?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %} + ![Custom position of title in Blazor Chart](images/appearance/blazor-chart-title-position-custom.png) -{% previewsample "https://blazorplayground.syncfusion.com/embed/BjLoXTtfLyEQbMWr?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %} ## Chart subtitle -The [SubTitle](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.SfChart.html#Syncfusion_Blazor_Charts_SfChart_SubTitle) property can be used to add a subtitle to the chart in-order to provide additional information about the data displayed. +Add a subtitle using the [SubTitle](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.SfChart.html#Syncfusion_Blazor_Charts_SfChart_SubTitle) property for additional information about the chart data. ```cshtml @@ -392,8 +387,7 @@ The [SubTitle](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.Sf - - + @@ -401,7 +395,7 @@ The [SubTitle](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.Sf -@code{ +@code { public class ChartData { public string Country { get; set; } @@ -409,15 +403,15 @@ The [SubTitle](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.Sf } public List MedalDetails = new List - { - new ChartData{ Country= "USA", Gold=50 }, - new ChartData{ Country="China", Gold=40 }, - new ChartData{ Country= "Japan", Gold=70 }, - new ChartData{ Country= "Australia", Gold=60}, - new ChartData{ Country= "France", Gold=50 }, - new ChartData{ Country= "Germany", Gold=40 }, - new ChartData{ Country= "Italy", Gold=40 }, - new ChartData{ Country= "Sweden", Gold=30 } + { + new ChartData { Country = "USA", Gold = 50 }, + new ChartData { Country = "China", Gold = 40 }, + new ChartData { Country = "Japan", Gold = 70 }, + new ChartData { Country = "Australia", Gold = 60 }, + new ChartData { Country = "France", Gold = 50 }, + new ChartData { Country = "Germany", Gold = 40 }, + new ChartData { Country = "Italy", Gold = 40 }, + new ChartData { Country = "Sweden", Gold = 30 } }; } @@ -429,5 +423,5 @@ N> The chart components do not use any CSS style for customization; chart elemen ## See also -* [Data Label](./data-labels) -* [Tooltip](./tool-tip) \ No newline at end of file +* [Data label](./data-labels) +* [Tooltip](./tool-tip) diff --git a/blazor/chart/chart-series.md b/blazor/chart/chart-series.md index fb8076b8d6..bf3ff76dce 100644 --- a/blazor/chart/chart-series.md +++ b/blazor/chart/chart-series.md @@ -1,7 +1,7 @@ --- layout: post title: Mixed Chart in Blazor Charts Component | Syncfusion -description: Checkout and learn here all about the Mixed Chart in Syncfusion Blazor Charts component and much more. +description: Check out and learn how to configure the Mixed Chart in Syncfusion Blazor Charts component for combining multiple series types in one visualization. platform: Blazor control: Chart documentation: ug @@ -9,16 +9,16 @@ documentation: ug # Mixed Chart in Blazor Charts Component -## Multiple chart series +## Multiple Chart Series -The [ChartSeries](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartSeries.html) property allows to add multiple series to the chart. The series are rendered in the order they were added to the series array. +The [ChartSeries](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartSeries.html) property enables multiple series to be added to a chart. Series are rendered in the order they appear in the series array. ```cshtml @using Syncfusion.Blazor.Charts - + @@ -30,7 +30,7 @@ The [ChartSeries](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts -@code{ +@code { public class ChartData { public string Country { get; set; } @@ -41,14 +41,14 @@ The [ChartSeries](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts public List MedalDetails = new List { - new ChartData{ Country= "USA", Gold=50, Silver=70, Bronze=45 }, - new ChartData{ Country="China", Gold=40, Silver= 60, Bronze=55 }, - new ChartData{ Country= "Japan", Gold=70, Silver= 60, Bronze=50 }, - new ChartData{ Country= "Australia", Gold=60, Silver= 56, Bronze=40 }, - new ChartData{ Country= "France", Gold=50, Silver= 45, Bronze=35 }, - new ChartData{ Country= "Germany", Gold=40, Silver=30, Bronze=22 }, - new ChartData{ Country= "Italy", Gold=40, Silver=35, Bronze=37 }, - new ChartData{ Country= "Sweden", Gold=30, Silver=25, Bronze=27 } + new ChartData { Country = "USA", Gold = 50, Silver = 70, Bronze = 45 }, + new ChartData { Country = "China", Gold = 40, Silver = 60, Bronze = 55 }, + new ChartData { Country = "Japan", Gold = 70, Silver = 60, Bronze = 50 }, + new ChartData { Country = "Australia", Gold = 60, Silver = 56, Bronze = 40 }, + new ChartData { Country = "France", Gold = 50, Silver = 45, Bronze = 35 }, + new ChartData { Country = "Germany", Gold = 40, Silver = 30, Bronze = 22 }, + new ChartData { Country = "Italy", Gold = 40, Silver = 35, Bronze = 37 }, + new ChartData { Country = "Sweden", Gold = 30, Silver = 25, Bronze = 27 } }; } @@ -56,9 +56,9 @@ The [ChartSeries](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts ![Blazor Column Chart with Multiple Series](images/multiple-series/blazor-column-chart-multiple-series.png) -## Combination chart series +## Series Combination -A chart can be created by combining several chart types such as line, column, and so on. +A chart can be created by combining different chart types, such as line and column. Bar series cannot be combined with other series due to axis orientation differences. N> Bar series cannot be combined with any other series as the axis orientation is different from other series. @@ -67,7 +67,7 @@ N> Bar series cannot be combined with any other series as the axis orientation i @using Syncfusion.Blazor.Charts - + @@ -84,7 +84,7 @@ N> Bar series cannot be combined with any other series as the axis orientation i -@code{ +@code { public class ChartData { public string X { get; set; } @@ -97,17 +97,17 @@ N> Bar series cannot be combined with any other series as the axis orientation i public List SalesReports = new List { - new ChartData { X= "2005", Y= 1.2, Y1= 0.5, Y2= 0.7, Y3= -0.8, Y4= 1.5 }, - new ChartData { X= "2006", Y= 1, Y1= 0.5, Y2= 1.4, Y3= 0, Y4= 2.3 }, - new ChartData { X= "2007", Y= 1, Y1= 0.5, Y2= 1.5, Y3= -1, Y4= 2 }, - new ChartData { X= "2008", Y= 0.25, Y1= 0.35, Y2= 0.35, Y3= -.35, Y4= 0.1 }, - new ChartData { X= "2009", Y= 0.1, Y1= 0.9, Y2= -2.7, Y3= -0.3, Y4= -2.7 }, - new ChartData { X= "2010", Y= 1, Y1= 0.5, Y2= 0.5, Y3= -0.5, Y4= 1.8 }, - new ChartData { X= "2011", Y= 0.1, Y1= 0.25, Y2= 0.25, Y3= 0, Y4= 2 }, - new ChartData { X= "2012", Y= -0.25, Y1= -0.5, Y2= -0.1, Y3= -0.4, Y4= 0.4 }, - new ChartData { X= "2013", Y= 0.25, Y1= 0.5, Y2= -0.3, Y3= 0, Y4= 0.9 }, - new ChartData { X= "2014", Y= 0.6, Y1= 0.6, Y2= -0.6, Y3= -0.6, Y4= 0.4 }, - new ChartData { X= "2015", Y= 0.9, Y1= 0.5, Y2= 0, Y3= -0.3, Y4= 1.3 } + new ChartData { X = "2005", Y = 1.2, Y1 = 0.5, Y2 = 0.7, Y3 = -0.8, Y4 = 1.5 }, + new ChartData { X = "2006", Y = 1, Y1 = 0.5, Y2 = 1.4, Y = 0, Y4 = 2.3 }, + new ChartData { X = "2007", Y = 1, Y1 = 0.5, Y2 = 1.5, Y3 = -1, Y4 = 2 }, + new ChartData { X = "2008", Y = 0.25, Y1 = 0.35, Y2 = 0.35, Y3 = -.35, Y4 = 0.1 }, + new ChartData { X = "2009", Y = 0.1, Y1 = 0.9, Y2 = -2.7, Y3 = -0.3, Y4 = -2.7 }, + new ChartData { X = "2010", Y = 1, Y1 = 0.5, Y2 = 0.5, Y3 = -0.5, Y4 = 1.8 }, + new ChartData { X = "2011", Y = 0.1, Y1 = 0.25, Y2 = 0.25, Y3 = 0, Y4 = 2 }, + new ChartData { X = "2012", Y = -0.25, Y1 = -0.5, Y2 = -0.1, Y3 = -0.4, Y4 = 0.4 }, + new ChartData { X = "2013", Y = 0.25, Y1 = 0.5, Y2 = -0.3, Y3 = 0, Y4 = 0.9 }, + new ChartData { X = "2014", Y = 0.6, Y1 = 0.6, Y2 = -0.6, Y3 = -0.6, Y4 = 0.4 }, + new ChartData { X = "2015", Y = 0.9, Y1 = 0.5, Y2 = 0, Y3 = -0.3, Y4 = 1.3 } }; } diff --git a/blazor/chart/data-label-template.md b/blazor/chart/data-label-template.md index c4a2bf05ce..61048e2ce6 100644 --- a/blazor/chart/data-label-template.md +++ b/blazor/chart/data-label-template.md @@ -1,7 +1,7 @@ --- layout: post -title: Datalabel Template in Blazor Charts Component | Syncfusion -description: Checkout and learn here all about the Datalabel Template in Syncfusion Blazor Charts component and much more. +title: Data Label Template in Blazor Charts Component | Syncfusion +description: Check out and learn how to configure Data Label Template in Syncfusion Blazor Charts component to display custom content on chart data points. platform: Blazor control: Chart documentation: ug @@ -9,11 +9,12 @@ documentation: ug -# Datalabel Template in Blazor Charts Component +# Data Label Template in Blazor Charts Component -Text and interior information for a point can be bound from a datasource other than the x and y values. The implicit named parameter context can be used to access the aggregate values within the [Template](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartDataLabel.html#Syncfusion_Blazor_Charts_ChartDataLabel_Template). To retrieve aggregate values inside the template, type cast the context as [ChartDataPointInfo](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartDataPointInfo.html). The context attribute can also be used to modify the name of this implicit parameter. For example, the data label information can be accessed using context in the template as shown below. +Text and additional information for a data point can be bound from a datasource beyond the x and y values. Use the implicit named parameter context to access aggregate values within the [Template](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartDataLabel.html#Syncfusion_Blazor_Charts_ChartDataLabel_Template). To retrieve aggregate values inside the template, type cast the context as [ChartDataPointInfo](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Charts.ChartDataPointInfo.html). You can also modify the name of this implicit parameter using the context attribute. ```cshtml +