|
28 | 28 | </Section> |
29 | 29 |
|
30 | 30 | <Section Class="p-0" Size="HeadingSize.H4" Name="Horizontal bar chart" PageUrl="@pageUrl" Link="horizontal-bar-chart"> |
31 | | -<Demo Type="typeof(BarChart_Demo_02_Horizontal_BarChart)" /> |
| 31 | + <Block> |
| 32 | + The <strong>Horizontal Bar Chart</strong> displays data values as horizontal bars, making it ideal for comparing categories with long labels or when you want to emphasize comparison between values. |
| 33 | + <br /><br /> |
| 34 | + <strong>How to use:</strong> |
| 35 | + <ul> |
| 36 | + <li>Use the <code>BarChart</code> component and set the <code>IndexAxis</code> option to <code>'y'</code> to render bars horizontally.</li> |
| 37 | + <li>Provide your data and labels as you would for a standard bar chart.</li> |
| 38 | + <li>Customize colors and appearance using the available palette utilities or your own color set.</li> |
| 39 | + </ul> |
| 40 | + Refer to the demo code below for a working example and configuration options. |
| 41 | + </Block> |
| 42 | + <Demo Type="typeof(BarChart_Demo_02_Horizontal_BarChart)" Tabs="true" /> |
32 | 43 | </Section> |
33 | 44 |
|
34 | 45 | <Section Class="p-0" Size="HeadingSize.H4" Name="Stacked bar chart" PageUrl="@pageUrl" Link="stacked-bar-chart"> |
35 | | -<Demo Type="typeof(BarChart_Demo_03_Stacked_BarChart)" /> |
| 46 | + <Block> |
| 47 | + The <strong>Stacked Bar Chart</strong> allows you to display multiple data series stacked on top of each other, making it easy to compare the total and individual contributions of each series for every category. |
| 48 | + <br /><br /> |
| 49 | + <strong>How to use:</strong> |
| 50 | + <ul> |
| 51 | + <li>Use the <code>BarChart</code> component and configure the <code>Options.Scales.X.Stacked</code> and <code>Options.Scales.Y.Stacked</code> properties to <code>true</code> to enable stacking.</li> |
| 52 | + <li>Provide multiple datasets in your chart data, each representing a different series to be stacked.</li> |
| 53 | + <li>Customize colors for each dataset using palette utilities or your own color set for better distinction.</li> |
| 54 | + <li>Refer to the demo code below for a working example and further configuration options.</li> |
| 55 | + </ul> |
| 56 | + </Block> |
| 57 | + <Demo Type="typeof(BarChart_Demo_03_Stacked_BarChart)" Tabs="true" /> |
36 | 58 | </Section> |
37 | 59 |
|
38 | 60 | <Section Class="p-0" Size="HeadingSize.H4" Name="Stacked bar chart with data labels" PageUrl="@pageUrl" Link="stacked-bar-chart-with-data-labels"> |
39 | | -<Demo Type="typeof(BarChart_Demo_04_Stacked_BarChart_with_Datalabels)" /> |
| 61 | + <Block> |
| 62 | + The <strong>Stacked Bar Chart with Data Labels</strong> enhances the standard stacked bar chart by displaying value labels directly on each bar segment. This makes it easier to read and compare the values of each dataset within a category. |
| 63 | + <br /><br /> |
| 64 | + <strong>How to use:</strong> |
| 65 | + <ul> |
| 66 | + <li>Use the <code>BarChart</code> component and enable stacking by setting <code>Options.Scales.X.Stacked</code> and <code>Options.Scales.Y.Stacked</code> to <code>true</code>.</li> |
| 67 | + <li>Add multiple datasets to your chart data to represent different series.</li> |
| 68 | + <li>Enable data labels by configuring the chart's plugins, such as <code>Options.Plugins.Datalabels.Display = true</code>.</li> |
| 69 | + <li>Customize the appearance and formatting of data labels as needed for your scenario.</li> |
| 70 | + </ul> |
| 71 | + Refer to the demo code below for a working example and further configuration options. |
| 72 | + </Block> |
| 73 | + <Demo Type="typeof(BarChart_Demo_04_Stacked_BarChart_with_Datalabels)" Tabs="true" /> |
40 | 74 | </Section> |
41 | 75 |
|
42 | 76 | <Section Class="p-0" Size="HeadingSize.H4" Name="Locale" PageUrl="@pageUrl" Link="locale"> |
43 | | -<Demo Type="typeof(BarChart_Demo_05_Locale)" /> |
| 77 | + <Block> |
| 78 | + The <strong>Locale</strong> demo shows how to localize number and date formatting in your bar chart. |
| 79 | + <br /><br /> |
| 80 | + <strong>How to use:</strong> |
| 81 | + <ul> |
| 82 | + <li>Set the <code>Locale</code> property on the <code>BarChart</code> component to your desired culture code (e.g., <code>"fr-FR"</code> for French).</li> |
| 83 | + <li>Number and date labels in the chart will automatically format according to the specified locale.</li> |
| 84 | + <li>This is useful for displaying charts to users in different regions with appropriate formatting.</li> |
| 85 | + </ul> |
| 86 | + Refer to the demo code below for a working example and configuration options. |
| 87 | + </Block> |
| 88 | + <Demo Type="typeof(BarChart_Demo_05_Locale)" Tabs="true" /> |
44 | 89 | </Section> |
45 | 90 |
|
46 | 91 | @code { |
|
0 commit comments