Hi,
I am using Donut charts (ejs-accumulation chart) in a pane of a dashboard layout.
In the middle of the chart (into the hole), I want to add a data field (value).
On this forum I found some code that should do this, but somehow the field value is not shown in the middle of the chart but in the left upper corner of the pane. Trying to change the css did not help.
I use the code below. Can you point me out where I go wrong?
<e-panel
[row]="1" [col]="0">
<ng-template #header>
<div class="graph-title">Verbeterpunten:<br> Nog te doen ({{ improvementStock }})</div>
</ng-template>
<ng-template #content>
<ejs-accumulationchart
id="improvement-stock"
style='display:block; width: 190px; height: 190px'
background="none"
[legendSettings]="legendSettings">
<e-accumulation-series-collection>
<e-accumulation-annotations>
<e-accumulation-annotation
content='<div style="width: 100%; height: 100%; text-align: center; padding: 5px 5px 5px 5px">{{improvementStock}}</div>'
region='Chart'>
</e-accumulation-annotation>
</e-accumulation-annotations>
<e-accumulation-series
name='Project'
[dataSource]='poImprovementDataStock'
xName='x'
yName='y'
[startAngle]="startAngle"
[endAngle]="endAngle"
[palettes]="stockPalette"
innerRadius="70%"
radius="70%"
[dataLabel]="dataLabel">
</e-accumulation-series>
</e-accumulation-series-collection>
</ejs-accumulationchart>
</ng-template>
</e-panel>
regards,
Bob
|
<ejs-accumulationchart >
<e-accumulation-annotations>
<e-accumulation-annotation
content='<div style="width: 100%; height: 100%">Text</div>'
x='50%'
y='50%'
coordinateUnits='Pixel'
region='Series'>
</e-accumulation-annotation>
</e-accumulation-annotations>
</ejs-accumulationchart> |
Hi Durga,
Your solution is working perfect!
Many thanks for your help.
Regards,
Bob