diff --git a/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/editnewdash/editnewdash.component.ts b/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/editnewdash/editnewdash.component.ts index 5e444c9..aee6e20 100644 --- a/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/editnewdash/editnewdash.component.ts +++ b/frontend/angular-clarity-master/src/app/modules/main/builder/dashboardnew/editnewdash/editnewdash.component.ts @@ -759,6 +759,27 @@ export class EditnewdashComponent implements OnInit { table: '', connection: undefined }); + default: + // Handle any other chart types dynamically + // Extract chart type name from identifier (e.g., "heatmap_chart" -> "heatmap") + const chartTypeName = componentType.replace('_chart', ''); + const displayName = chartTypeName.charAt(0).toUpperCase() + chartTypeName.slice(1) + ' Chart'; + + // Create a unified chart with the dynamic chart type + return this.dashboardArray.push({ + cols: 5, + rows: 6, + x: 0, + y: 0, + chartid: maxChartId + 1, + component: UnifiedChartComponent, + name: displayName, + chartType: chartTypeName, + xAxis: '', + yAxis: '', + table: '', + connection: undefined + }); } } removeItem(item) {