|
18 | 18 | The <strong>Line Chart</strong> component visualizes data trends using connected data points, making it ideal for tracking changes over time or comparing multiple series. |
19 | 19 | <br /><br /> |
20 | 20 | <strong>How to use:</strong> |
21 | | - <ul> |
22 | | - <li>Define your chart data by specifying <code>Labels</code> for the X-axis and one or more <code>Datasets</code> for the Y-axis values.</li> |
23 | | - <li>Customize the chart appearance and behavior using the <code>Options</code> property (e.g., colors, line styles, tooltips, axis settings).</li> |
24 | | - <li>Add the <code>LineChart</code> component to your page and bind your data and options.</li> |
25 | | - <li>Refer to the demo code below for examples of basic usage, advanced customization, and dynamic updates.</li> |
26 | | - </ul> |
| 21 | + <div class="content"> |
| 22 | + <ol> |
| 23 | + <li>Define your chart data by specifying <code>Labels</code> for the X-axis and one or more <code>Datasets</code> for the Y-axis values.</li> |
| 24 | + <li>Customize the chart appearance and behavior using the <code>Options</code> property (e.g., colors, line styles, tooltips, axis settings).</li> |
| 25 | + <li>Add the <code>LineChart</code> component to your page and bind your data and options.</li> |
| 26 | + <li>Refer to the demo code below for examples of basic usage, advanced customization, and dynamic updates.</li> |
| 27 | + </ol> |
| 28 | + </div> |
27 | 29 | These demos demonstrate how to set up a line chart, configure its appearance, and update the data or options to fit your application's needs. |
28 | 30 | </Block> |
29 | 31 | <Demo Type="typeof(LineChart_Demo_01_A_Examples)" Tabs="true" /> |
|
40 | 42 | The <strong>Line Chart</strong> component supports data labels, allowing you to display values directly on each data point in the chart. |
41 | 43 | <br /><br /> |
42 | 44 | <strong>How to use:</strong> |
43 | | - <ul> |
44 | | - <li>Enable data labels by setting <code>Options.Plugins.Datalabels.Display = true</code> in your chart options.</li> |
45 | | - <li>Customize the label content, formatting, and position using the available plugin settings.</li> |
46 | | - <li>Bind your data and labels to the chart as usual.</li> |
47 | | - <li>Refer to the demo code below for a working example and further configuration options.</li> |
48 | | - </ul> |
| 45 | + <div class="content"> |
| 46 | + <ol> |
| 47 | + <li>Enable data labels by setting <code>Options.Plugins.Datalabels.Display = true</code> in your chart options.</li> |
| 48 | + <li>Customize the label content, formatting, and position using the available plugin settings.</li> |
| 49 | + <li>Bind your data and labels to the chart as usual.</li> |
| 50 | + <li>Refer to the demo code below for a working example and further configuration options.</li> |
| 51 | + </ol> |
| 52 | + </div> |
49 | 53 | Data labels make it easier for users to interpret the chart by showing the exact value of each point directly on the line. |
50 | 54 | </Block> |
51 | 55 | <Demo Type="typeof(LineChart_Demo_02_Datalabels)" Tabs="true" /> |
|
56 | 60 | The <strong>Tick Configuration</strong> demo shows how to customize the appearance and behavior of axis ticks in the Line Chart component. |
57 | 61 | <br /><br /> |
58 | 62 | <strong>How to use:</strong> |
59 | | - <ul> |
60 | | - <li>Use the <code>Options.Scales.X.Ticks</code> and <code>Options.Scales.Y.Ticks</code> properties to control tick display, such as step size, min/max values, and formatting.</li> |
61 | | - <li>You can format tick labels, hide or show specific ticks, and adjust their appearance to improve chart readability.</li> |
62 | | - <li>Apply custom logic for tick callbacks to display values in a specific format (e.g., currency, percentage).</li> |
63 | | - <li>Refer to the demo code below for practical examples of configuring axis ticks for your data visualization needs.</li> |
64 | | - </ul> |
| 63 | + <div class="content"> |
| 64 | + <ol> |
| 65 | + <li>Use the <code>Options.Scales.X.Ticks</code> and <code>Options.Scales.Y.Ticks</code> properties to control tick display, such as step size, min/max values, and formatting.</li> |
| 66 | + <li>You can format tick labels, hide or show specific ticks, and adjust their appearance to improve chart readability.</li> |
| 67 | + <li>Apply custom logic for tick callbacks to display values in a specific format (e.g., currency, percentage).</li> |
| 68 | + <li>Refer to the demo code below for practical examples of configuring axis ticks for your data visualization needs.</li> |
| 69 | + </ol> |
| 70 | + </div> |
65 | 71 | Customizing tick configuration helps ensure your chart is clear and tailored to your application's requirements. |
66 | 72 | </Block> |
67 | 73 | <Demo Type="typeof(LineChart_Demo_03_Tick_Configuration)" Tabs="true" /> |
|
72 | 78 | The <strong>Locale</strong> demo illustrates how to localize number and date formatting in the Line Chart component to match your users' regional preferences. |
73 | 79 | <br /><br /> |
74 | 80 | <strong>How to use:</strong> |
75 | | - <ul> |
76 | | - <li>Set the <code>Locale</code> property on the <code>LineChart</code> component to your desired culture code (e.g., <code>"de-DE"</code> for German).</li> |
77 | | - <li>All number and date labels in the chart will automatically format according to the specified locale, ensuring correct separators, symbols, and date formats.</li> |
78 | | - <li>This is especially useful for applications targeting users in different regions, providing a familiar and accessible data presentation.</li> |
79 | | - <li>Refer to the demo code below for a working example and additional configuration options.</li> |
80 | | - </ul> |
| 81 | + <div class="content"> |
| 82 | + <ol> |
| 83 | + <li>Set the <code>Locale</code> property on the <code>LineChart</code> component to your desired culture code (e.g., <code>"de-DE"</code> for German).</li> |
| 84 | + <li>All number and date labels in the chart will automatically format according to the specified locale, ensuring correct separators, symbols, and date formats.</li> |
| 85 | + <li>This is especially useful for applications targeting users in different regions, providing a familiar and accessible data presentation.</li> |
| 86 | + <li>Refer to the demo code below for a working example and additional configuration options.</li> |
| 87 | + </ol> |
| 88 | + </div> |
81 | 89 | Adapting the chart's locale improves usability and ensures your data is presented in a way that aligns with your audience's expectations. |
82 | 90 | </Block> |
83 | 91 | <Demo Type="typeof(LineChart_Demo_04_Locale)" Tabs="true" /> |
|
0 commit comments