|
1 | 1 | @attribute [Route(pageUrl)] |
2 | 2 | @layout DemosMainLayout |
3 | 3 |
|
4 | | -<PageHeroSection PageUrl="@pageUrl" |
5 | | - Title="@title" |
6 | | - Heading="@heading" |
7 | | - Description="@description" |
8 | | - ImageUrl="@imageUrl" /> |
| 4 | +<PageMetaTags PageUrl="@pageUrl" Title="@metaTitle" Description="@metaDescription" ImageUrl="@imageUrl" /> |
9 | 5 |
|
10 | | -<Prerequisites PageUrl="@pageUrl" /> |
| 6 | +<PageHero Title="@pageTitle"> |
| 7 | + <SubTitleTemplate> |
| 8 | + @((MarkupString)pageDescription) |
| 9 | + </SubTitleTemplate> |
| 10 | +</PageHero> |
| 11 | + |
| 12 | +<DocsLink Href="@RouteConstants.Docs_RadarChart" /> |
11 | 13 |
|
12 | | -<Section Size="HeadingSize.H4" Text="How it works" PageUrl="@pageUrl" HashTagName="how-it-works" /> |
13 | | -<div class="mb-3"> |
14 | | - In the following example, a categorical 12-color palette is used. |
15 | | -</div> |
16 | | -<BlazorBootstrap.Callout Heading="TIP" Color="CalloutColor.Success"> |
17 | | - For data visualization, you can use the predefined palettes <code>ColorUtility.CategoricalTwelveColors</code> for a 12-color palette and <code>ColorUtility.CategoricalSixColors</code> for a 6-color palette. |
18 | | - These palettes offer a range of distinct and visually appealing colors that can be applied to represent different categories or data elements in your visualizations. |
19 | | -</BlazorBootstrap.Callout> |
| 14 | +<Prerequisites PageUrl="@pageUrl" /> |
20 | 15 |
|
21 | | -<Demo Type="typeof(RadarChart_Demo_01_Examples)" Tabs="true" /> |
| 16 | +<Section Class="p-0" Size="HeadingSize.H4" Name="How it works" PageUrl="@pageUrl" Link="how-it-works"> |
| 17 | + <Block> |
| 18 | + The <strong>Radar Chart</strong> component visualizes multivariate data with each variable represented on axes starting from the same point, making it ideal for comparing multiple groups across several categories. |
| 19 | + <br /><br /> |
| 20 | + <strong>How to use:</strong> |
| 21 | + <ul> |
| 22 | + <li>Add the <code>RadarChart</code> component to your page and set its dimensions (e.g., <code>Width="600"</code>).</li> |
| 23 | + <li>Prepare your chart data by specifying <code>Labels</code> for each axis and one or more <code>Datasets</code> with values and styling options.</li> |
| 24 | + <li>Configure chart options such as <code>Responsive</code> using the <code>RadarChartOptions</code> object.</li> |
| 25 | + <li>Initialize the chart in <code>OnAfterRenderAsync</code> by calling <code>radarChart.InitializeAsync(chartData, radarChartOptions)</code>.</li> |
| 26 | + <li>Use the demo's interactive buttons to randomize data, add datasets, or add new data points dynamically and see the chart update in real time.</li> |
| 27 | + <li>Refer to the demo code below for practical examples of data preparation, dynamic updates, and chart customization.</li> |
| 28 | + </ul> |
| 29 | + This demo demonstrates how to set up a Radar Chart, bind your data, and interactively update the chart to fit your application's needs. |
| 30 | + </Block> |
| 31 | + <Demo Type="typeof(RadarChart_Demo_01_Examples)" Tabs="true" /> |
| 32 | +</Section> |
22 | 33 |
|
23 | 34 | @code { |
24 | | - private const string pageUrl = "/charts/radar-chart"; |
25 | | - private const string title = "Blazor Radar Chart"; |
26 | | - private const string heading = "Blazor Radar Chart"; |
27 | | - private const string description = "A Blazor Bootstrap radar chart component is a way of showing multiple data points and the variation between them. They are often useful for comparing the points of two or more different data sets."; |
28 | | - private const string imageUrl = "https://i.imgur.com/MSFDsSo.png"; |
| 35 | + private const string pageUrl = RouteConstants.Demos_RadarChart; |
| 36 | + private const string pageTitle = "PolarArea Chart"; |
| 37 | + private const string pageDescription = "Explore interactive Blazor Radar Chart examples with source code. Learn how to visualize categorical data, customize chart appearance, and enhance your Blazor applications using the Radar Chart component. Try live demos and discover practical usage scenarios."; |
| 38 | + private const string metaTitle = "Blazor Radar Chart Examples & Interactive Demos"; |
| 39 | + private const string metaDescription = "Explore interactive Blazor Radar Chart examples with source code. Learn how to visualize categorical data, customize chart appearance, and enhance your Blazor applications using the Radar Chart component. Try live demos and discover practical usage scenarios."; |
| 40 | + private const string imageUrl = "https://i.imgur.com/8b7jH0D.png"; // TODO: Update with the actual image URL for the Line Chart demo |
29 | 41 | } |
0 commit comments