Hello,
I added a Stock Chart to one of my screens.
It is working properly but it is calling the web service continuosly despite the page and the chart are well loaded.
Here my code :
<ejs-stockchart id="stockchart" load="Loadstockchart" width="100%" tooltipRender="LoadToolTipstockchart">
<e-stockchart-series-collection>
<e-stockchart-series type='Line' xName='x' yName='amount' name='Purchases'> </e-stockchart-series>
</e-stockchart-series-collection>
<e-stockchart-primaryxaxis valueType="DateTime">
</e-stockchart-primaryxaxis>
</ejs-stockchart>
And here my js :
function Loadstockchart(args) {
var id = $("#SupplierId").val();
$.ajax({
type: "GET",
url: '/Supplier/GetTMSPurchasesAmountsBySupplier?id=' + id,
success: function (data) {
args.stockChart.series[0].dataSource = data;
},
error: function (msg) {
}
});
}
Here a screenshot of the browser inspector where you can see the huge amount of calls