<ej-chart id="charttt" ><e-size height="100%" width="100%"></e-size> <e-chart-series> <e-series datasource="ViewBag.ChartData" x-name="Month" y-name="Sales" type="Line"></e-series> </e-chart-series>
</ej-chart>
<ej-script-manager></ej-script-manager>
And call it via Ajax:
$.ajax({
type: "POST",
url: "/MMSUUTP/GetStatisticChart",
data: $.param({
dateStart: $('#DatetimeStatStart').val(),
dateEnd: $('#DatetimeStatEnd').val(),
id: selectedNodeID,
level: selectedDepth,
}),
dataType: 'text',
success: function (data) {
$("#Placeholder").html(data);
hideProgress();
}
});
Browser receive a content, but Chart is not
render.
If i remove <e-size height="100%"
width="100%"></e-size> or set "height" and "width" in
pixels Chart renders but incorrect dimensions (not full space of
"Placeholder").
Can i achieve this "full space
rendering" behaviour?
Thanks.
|
<div id="chart" style="width:800px; height:500px">
<ej-chart id="chart">
<e-size height="50%" width="50%"></e-size>
</ej-chart>
</div>
|
|
[index.chstml]
<div id="ChartContent" style="height:300px; width:100%; float:left ">
<div id="Placeholder" style="height:100%; width:33.3%; float:left; "></div>
</div>
[_ViewChart.cshtml]
<div id="chart" style="height:100%; width:100%;">
<ej-chart id="chart">
<e-size height="100%" width="100%"></e-size>
</ej-chart>
</div>
|
|
[_Layout.cshtml]
<body style="height:100vh">
The below is the parent of element with id ChartContainer, here also we need to specify the height
so that chart will be rendered properly.
<div class="container body-content" style="height:100vh">
</div>
</body>
[index.cshtml]
<div id="ChartContent" style="height:100%; width:100%; float:left ">
<div id="Placeholder" style="height:100%; width:33.3%; float:left; "></div>
<div style="height:100%; width:33.3%; float:left; "></div>
<div style="height:100%; width:33.3%; float:left;"></div>
</div>
|