Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
146704 | Aug 14,2019 08:04 PM UTC | Aug 15,2019 11:54 AM UTC | ASP.NET Core - EJ 2 | 1 |
![]() |
Tags: Charts |
<ejs-grid id="Grid" dataSource="ViewBag.dataSource" dataBound="dataBound"
toolbar="@(new List<string>() { "Update", "Cancel" })" allowPaging="true"
allowFiltering="true" actionComplete="actionComplete">
</ejs-grid>
<div id="Chart"></div>
<script>
var chart;
function dataBound(args) {
var grid = document.getElementById("Grid").ej2_instances[0];
chart = new ej.charts.Chart({
//Initializing Primary X Axis
primaryXAxis: {
},
series: [
{
type: 'Line',
dataSource: grid.getCurrentViewRecords(),
xName: 'OrderID', width: 2, marker: {
visible: true,
width: 10,
height: 10
},
yName: 'Freight', name: 'Germany',
},
],
});
chart.appendTo('#Chart');
}
function actionComplete(args) {
if (args.requestType === 'save') {
chart.series[0].dashArray = '5,5';
chart.refresh();
}
}
</script> |
Initial Rendering |
After Update Button Clicked |
|
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.