Update editnewdash.component.ts
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user