Update editnewdash.component.ts

This commit is contained in:
Gaurav Kumar
2025-11-05 10:49:53 +05:30
parent 40438fcc1b
commit c5d730ae22

View File

@@ -759,6 +759,27 @@ export class EditnewdashComponent implements OnInit {
table: '', table: '',
connection: undefined 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) { removeItem(item) {