|
1 |
| -# Dashboard for ASP.NET Core - How to change chart arguments at runtime |
2 |
| - |
3 |
| -This example demonstrates how to change Chart items with different settings in a tab container using a custom menu in a List Box item. |
4 |
| -Our Dashboard doesn't allow customizing a Chart item and changing its settings at runtime. A possible way is to create a tab container, add different chart items there, and manually set the group interval property of each chart. |
5 |
| - |
6 |
| -To add some automation, it is possible to add custom buttons to any dashboard item title and then use them to switch between tabs. I recommend using the [DashboardTitleToolbarUpdated](https://docs.devexpress.com/Dashboard/js-DevExpress.Dashboard.ViewerApiExtensionOptions#js_devexpress_dashboard_viewerapiextensionoptions_onitemcaptiontoolbarupdated) event to add the required buttons to the dashboard item title. |
7 |
| -As for switching between the tabs, I suggest you use the [setSelectedTabPage](https://docs.devexpress.com/Dashboard/js-DevExpress.Dashboard.ViewerApiExtension#js_devexpress_dashboard_viewerapiextension_setselectedtabpage_tabpagename_) or [setSelectedTabPageIndex](https://docs.devexpress.com/Dashboard/js-DevExpress.Dashboard.ViewerApiExtension#js_devexpress_dashboard_viewerapiextension_setselectedtabpageindex_tabcontainername_index_) functions. |
8 |
| - |
9 |
| -Also, you can modify the dashboard XML definition to hide the tab container’s caption: |
10 |
| -``` |
11 |
| -<TabContainer ComponentName="tabContainerDashboardItem1" Name="Tab Container 1" ShowCaption="false"> |
12 |
| -<Pages> |
13 |
| -``` |
14 |
| - |
15 |
| -<!-- default file list --> |
16 |
| -*Files to look at*: |
17 |
| - |
18 |
| -* [Index.cshtm](./CS/NetCoreDashboardApp/Pages/Index.cshtm) |
19 |
| -<!-- default file list end --> |
| 1 | +# Dashboard for ASP.NET Core - How to change chart arguments at runtime |
| 2 | + |
| 3 | +<!-- default file list --> |
| 4 | +*Files to look at*: |
| 5 | +* [Index](./CS/NetCoreDashboardApp/Pages/Index.cshtml) |
| 6 | +<!-- default file list end --> |
| 7 | + |
| 8 | +This example uses a custom menu in a List Box item to change Chart items with different settings in a tab container. |
| 9 | +Our Dashboard doesn't support the ability to customize a Chart item and change its settings at runtime. A possible way is to create a tab container, add different chart items to it, and manually set the group interval property of each chart. |
| 10 | + |
| 11 | +To implement automation, add custom buttons to any dashboard item title and then use them to switch between tabs. For this, use the [DashboardTitleToolbarUpdated](https://docs.devexpress.com/Dashboard/js-DevExpress.Dashboard.ViewerApiExtensionOptions#js_devexpress_dashboard_viewerapiextensionoptions_onitemcaptiontoolbarupdated) event to add the required buttons to the dashboard item title. |
| 12 | +As for switching between the tabs, you can use the [setSelectedTabPage](https://docs.devexpress.com/Dashboard/js-DevExpress.Dashboard.ViewerApiExtension#js_devexpress_dashboard_viewerapiextension_setselectedtabpage_tabpagename_) or [setSelectedTabPageIndex](https://docs.devexpress.com/Dashboard/js-DevExpress.Dashboard.ViewerApiExtension#js_devexpress_dashboard_viewerapiextension_setselectedtabpageindex_tabcontainername_index_) function. |
| 13 | + |
| 14 | +Also, you can modify the dashboard XML definition to hide the tab container’s caption, add the ShowCaption property and set it to false: |
| 15 | +``` |
| 16 | +<TabContainer ComponentName="tabContainerDashboardItem1" Name="Tab Container 1" ShowCaption="false"> |
| 17 | +<Pages> |
| 18 | +``` |
| 19 | + |
| 20 | +<!-- default file list --> |
| 21 | +*Files to look at*: |
| 22 | + |
| 23 | +* [Index.cshtm](./CS/NetCoreDashboardApp/Pages/Index.cshtm) |
0 commit comments