I want to change chart data based on selection from TreeView or other controls. I have tried to search all solutions on internet, including here...the following seems the right approach but not working for me...
First, I get selected ID from TreeView, then try to use it as parameter to call an Action by URL..
Anything wrong here? Thanks
<script>
function onSelect(e) {
var data = $('#MarketDrivers').data('kendoTreeView').dataItem(e.node);
//$('#driverlist').html(data.id);
var ds = new kendo.data.dataSource({
transport: {
read: {
type: "GET",
url: "/Blotter/getUserViewHist",
data: { factorID_: data.id },
dataType: "json"
}
}
});
var chart = $("#PersonalSummary").data("kendoChart");
chart.setDataSource(ds);
chart.dataSource.read();
}
</script>
I have an Action from Blotter controller as below
public ActionResult getUserViewHist(int factorID_)