ASP.NET Core:
<ej-chart>
//Made legend visible
<e-legend visible="true"></e-legend>
<e-chart-series>
//Data label position
<e-series label-position="Inside" >
<e-points>
//Text to be displayed in pie series
<e-point x="Other Personal" y="30" text="Other Personal, 88.47%"></e-point>
<e-point x="Medical care" y="34" text="Medical care, 8.49%"></e-point>
//...
</e-points>
<e-marker>
//Data label visibility
<e-data-label visible="true">
</e-data-label>
</e-marker>
</e-series>
</e-chart-series>
|
<ej-chart display-text-rendering="labelsRender">
</ej-chart>
function labelsRender(sender) {
sender.data.text = ej.format(sender.data.text, "p1");
} |
thank you for the answer.
is it possible to do iteration inside <e-point>? it gave error about tag helper.
<ej-chart id="container" can-resize="true" load="chartLoad">
</ej-chart>
var x = [1, 2, 3, 4, 5, 6, 7, 8];
var y = [12, 23, 31, 29, 34, 21, 26, 31, 42];
function chartLoad(sender) {
sender.model.series[0].points = [];
for (var i = 0; i < 8; i++)
sender.model.series[0].points.push({ x: x[i], y: y[i] });
} |
hi Dharanidharan,
thank you for you answer. what i meant was, how can i do iteration inside
<e-series label-position="Inside" >
<e-points> @{ foreach( var item in Model) { <e-point x="@Model.XData" y="@Model.YData" text="@Model.Text">e-point> } e-points>
it gives error "The parent
this is what i'm trying to achieve
please assist me on this. thank you.
ASP.NET core:
<ej-chart >
<e-chart-series>
<e-series x-name ="Xvalue" y-name="YValue1" datasource="ViewBag.chartData">
<e-marker>
<e-data-label visible="true" text-mapping-name="Text">
</e-data-label>
</e-marker>
</e-series>
</e-chart-series>
</ej-chart>
|