From 8644bebbc5be3fae42bba0ca712d6a70b02087b8 Mon Sep 17 00:00:00 2001 From: gmurray81 Date: Thu, 12 Dec 2024 16:14:00 -0500 Subject: [PATCH] improve tile samples --- .../DashboardTileGaugeOnInit/Blazor.cs | 2 +- .../DashboardTileGaugeOnInit/WPF.cs | 13 +++++++++++++ .../DashboardTileGaugeOnInit/Web.ts | 4 ++-- .../dashboard-tile/chart-dashboard.json | 6 ++---- .../dashboard-tile/gauge-dashboard.json | 3 ++- .../charts/dashboard-tile/map-dashboard.json | 19 +++++++++++++++++++ .../charts/dashboard-tile/pie-dashboard.json | 2 +- 7 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 code-gen-library/DashboardTileGaugeOnInit/WPF.cs create mode 100644 samples/charts/dashboard-tile/map-dashboard.json diff --git a/code-gen-library/DashboardTileGaugeOnInit/Blazor.cs b/code-gen-library/DashboardTileGaugeOnInit/Blazor.cs index 40cb3b55..6a0e6b1d 100644 --- a/code-gen-library/DashboardTileGaugeOnInit/Blazor.cs +++ b/code-gen-library/DashboardTileGaugeOnInit/Blazor.cs @@ -8,7 +8,7 @@ public class DashboardTileGaugeOnInit //begin eventHandler public void DashboardTileGaugeOnInit() { - + CodeGenHelper.GetDescription("content").dataSource = 40; } //end eventHandler } \ No newline at end of file diff --git a/code-gen-library/DashboardTileGaugeOnInit/WPF.cs b/code-gen-library/DashboardTileGaugeOnInit/WPF.cs new file mode 100644 index 00000000..ba1f461d --- /dev/null +++ b/code-gen-library/DashboardTileGaugeOnInit/WPF.cs @@ -0,0 +1,13 @@ +//begin imports +using Infragistics.Controls.Dashboards; +//end imports + +public class DashboardTileGaugeOnInit +{ + //begin eventHandler + public void DashboardTileGaugeOnInit() + { + CodeGenHelper.GetDescription("content").ItemsSource = 40; + } + //end eventHandler +} \ No newline at end of file diff --git a/code-gen-library/DashboardTileGaugeOnInit/Web.ts b/code-gen-library/DashboardTileGaugeOnInit/Web.ts index 46fa08d5..d158dbd9 100644 --- a/code-gen-library/DashboardTileGaugeOnInit/Web.ts +++ b/code-gen-library/DashboardTileGaugeOnInit/Web.ts @@ -1,5 +1,5 @@ //begin imports -import { IgcToolbarComponent, IgcToolActionLabelComponent, IgcToolActionComponent, IgcToolCommandEventArgs } from 'igniteui-webcomponents-layouts'; +import { IgcDashboardTileComponent } from 'igniteui-webcomponents-dashboards'; //end imports import { CodeGenHelper } from 'igniteui-webcomponents-core'; @@ -8,7 +8,7 @@ export class DashboardTileGaugeOnInit { //begin eventHandler public dashboardTileGaugeOnInit(): void { - + CodeGenHelper.GetDescription("content").dataSource = 40; } //end eventHandler diff --git a/samples/charts/dashboard-tile/chart-dashboard.json b/samples/charts/dashboard-tile/chart-dashboard.json index 1ccd8c82..9a9585df 100644 --- a/samples/charts/dashboard-tile/chart-dashboard.json +++ b/samples/charts/dashboard-tile/chart-dashboard.json @@ -1,12 +1,10 @@ { - "export": false, + "export": true, "descriptions": { "content": { "type": "DashboardTile", "name": "dashboard", - "dataSourceRef": "EnergyRenewableConsumption", - "includedProperties": ["location", "hydro", "solar", "wind", "other"], - "visualizationType": "ColumnChart" + "dataSourceRef": "OlympicMedalsTopCountries" } }, "modules": [ diff --git a/samples/charts/dashboard-tile/gauge-dashboard.json b/samples/charts/dashboard-tile/gauge-dashboard.json index 7833b82b..d29b84a6 100644 --- a/samples/charts/dashboard-tile/gauge-dashboard.json +++ b/samples/charts/dashboard-tile/gauge-dashboard.json @@ -1,8 +1,9 @@ { - "export": false, + "export": true, "onInit": ["DashboardTileGaugeOnInit"], "descriptions": { "content": { + "tileTitle": "Sample Gauge", "type": "DashboardTile", "name": "dashboard" } diff --git a/samples/charts/dashboard-tile/map-dashboard.json b/samples/charts/dashboard-tile/map-dashboard.json new file mode 100644 index 00000000..a71656db --- /dev/null +++ b/samples/charts/dashboard-tile/map-dashboard.json @@ -0,0 +1,19 @@ +{ + "export": true, + "descriptions": { + "content": { + "type": "DashboardTile", + "name": "dashboard", + "tileTitle": "World Cities", + "dataSourceRef": "WorldCities" + } + }, + "modules": [ + "dashboards/DashboardTileModule", + "dashboards/DataChartDashboardTileModule", + "dashboards/GeographicMapDashboardTileModule", + "dashboards/LinearGaugeDashboardTileModule", + "dashboards/PieChartDashboardTileModule", + "dashboards/RadialGaugeDashboardTileModule" + ] +} \ No newline at end of file diff --git a/samples/charts/dashboard-tile/pie-dashboard.json b/samples/charts/dashboard-tile/pie-dashboard.json index 976c1faa..5a74ab55 100644 --- a/samples/charts/dashboard-tile/pie-dashboard.json +++ b/samples/charts/dashboard-tile/pie-dashboard.json @@ -1,5 +1,5 @@ { - "export": false, + "export": true, "descriptions": { "content": { "type": "DashboardTile",