
public JsonResult Get_Pie_DocumentCost()
I use this method for getting data on SQL.
var url="/Report/Get_Pie_DocumentCost";
var source =
{
datatype: "json",
datafields: [
{ name: 'Type' },
{ name: 'DocumentCost' }
],
url:url
};
This is javascript code for pie chart source.
I want when I click blue part of the chart method give me value for TypeID=1 or click green part TypeID=2. Then I gave it to my method for getting data on SQL.
public JsonResult Get_Pie_DocumentCost_ByBranchID(int TypeID)
After that my datafields change like this.
var url="/Report/Get_Pie_DocumentCost_ByTypeID";
var source =
{
datatype: "json",
datafields: [
{ name: 'DocumentCost' },
{ name: 'ServiceCost' },
{ name: 'WorkmanshipCost' },
{ name: 'SupplyCost' },
{ name: 'ShipmentCost' },
{ name: 'GlassCost' }
],
url:url
};
I hope you can understand this time.
58