Hi,
Based upon your documentation, I implented a piechart into a panel(see example 1) which works fine, the second part(see example2) is what I "want".
There are 2 possible solutions to replace the header + content of a panel, preferable number 1.
1. Using the example 2(fill object directly) can you give the correct translation when comparing example 1(default) vs example 2? Then I got what I need(store, save etc).
1.a When translating any idea why the angular material classes are not getting seen using this method, but the css-classes "do"?
2. Another solution would be to retrieve the contents of the ng-template(s) header+ content and save the "it", but getHtmlId/name/class etc trying to find the panels doesnt seem to work. If , you know how, then i'll know 'what' to replace.
your serialize method works fine btw for the rest of the data.
.HTML
<ejs-dashboardlayout max id='dashboardLayout' #dashLayout [cellSpacing]='cellSpacing'
[columns]="6"
[cellAspectRatio]='aspectRatio'
<e-panels>
<e-panel [sizeX]="2" [sizeY]="2" [row]="2" [col]="2">
<ng-template #header>
<div style="float: left">{{block1}}</div>
<div style="float: right">
<button style="margin-right: -10px; margin-top: -20px" class="mat-settings-button" mat-icon-button (click)="openDialog(1)">
<mat-icon>settings</mat-icon>
</button>
<button style="margin-right: -20px; margin-top: -20px" class="mat-settings-button" mat-icon-button (click)="remove(1)">
<mat-icon>clear</mat-icon>
</button>
</div>
</ng-template>
<ng-template #content>
<ejs-accumulationchart id="pieChart1" [legendSettings]='legendSettings'>
<e-accumulation-series-collection>
<e-accumulation-series [dataSource]='pieData' xName='x' yName='y' innerRadius="0%" radius="100%">
</e-accumulation-series>
</e-accumulation-series-collection>
</ejs-accumulationchart>
</ng-template>
</e-panel>
</e-panels>
</ejs-dashboardlayout>
.TS
panels: PanelModel[] = []
cellSpacing: number[] = [10, 10];
aspectRatio: any = 100 / 80;
block1: string = "example1";
-------> EXAMPLE 2
.HTML
<ejs-dashboardlayout max id='dashboardLayout' #dashLayout [cellSpacing]='cellSpacing'
[columns]="6"
[cellAspectRatio]='aspectRatio'
[panels]="panels">
.TS
block1: string = "example1";
cellSpacing: number[] = [10, 10];
aspectRatio: any = 100 / 80;
panels: PanelModel[] = [
{
"sizeX": 2,
"sizeY": 1,
"row": 0,
"col": 2,
header: `<div style="float: left">${this.block1}</div><div style="float: right"><button style="margin-right: -10px; margin-top: -20px" class="mat-settings-button" mat-icon-button (click)="openDialog(1)"><mat-icon>settings</mat-icon></button><button style="margin-right: -20px; margin-top: -20px" class="mat-settings-button" mat-icon-button (click)="remove(1)"><mat-icon>clear</mat-icon></button></div>`,
content: `<ng-template><ejs-accumulationchart id="pieChart1" [legendSettings]="legendSettings"><e-accumulation-series-collection><e-accumulation-series [dataSource]="pieData" xName="x" yName="y" innerRadius="0%" radius="100%"></e-accumulation-series> </e-accumulation-series-collection> </ejs-accumulationchart></ng-template>`
}
]