"Uncaught TypeError: closeIcon_.html(...).buttonMarkup is not a function"
Hi,
Please see the codes below, I modify the Index page in Home controller.
@*Reference the Infragistics ASP.NET MVC Helpers Assembly*@@using Infragistics.Web.Mvc
@*By defining the model type here, it is accessed in the View using the Model property*@@model igDataChartMVCExporttoPDF.Models.CustomersViewModel
@{ Layout = "~/Views/Shared/_Layout.cshtml";}
<!DOCTYPE html>
<html><head> <meta name="viewport" content="width=device-width" /> <title>Index</title>
<!-- These styles aren't required but provide better styling for labels on the running sample --> <style> BODY { font: 1em "Segoe UI",Helvetica,Tahoma,Arial,Verdana,sans-serif; }
H2 { margin: 40px 0 0 0; }
H3 { margin: 10px 0 0 0; } </style>
<link href="~/Infragistics/css/structure/infragistics.theme.css" rel="stylesheet" /> <link href="~/Infragistics/css/structure/infragistics.css" rel="stylesheet" />
<link href="~/Infragistics/css/structure/modules/infragistics.ui.chart.css" rel="stylesheet" />
<script src="http://modernizr.com/downloads/modernizr-latest.js"></script> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
<script src="~/Infragistics/js/infragistics.core.js"></script> <script src="~/Infragistics/js/infragistics.lob.js"></script> <script src="~/Infragistics/js/infragistics.dv.js"></script>
</head><body> <span>Body start</span> @using (Html.BeginForm()) {
<span>Hello world!</span>
} <span>Body end</span>
<div style="width: 80%; min-width: 210px;"> <div id="chart"></div></div></body>
</html>
<script> $(function () { var data = [ { "CountryName": "China", "Pop1995": 1216, "Pop2005": 1297, "Pop2015": 1361, "Pop2025": 1394 }, { "CountryName": "India", "Pop1995": 920, "Pop2005": 1090, "Pop2015": 1251, "Pop2025": 1396 }, { "CountryName": "United States", "Pop1995": 266, "Pop2005": 295, "Pop2015": 322, "Pop2025": 351 }, { "CountryName": "Indonesia", "Pop1995": 197, "Pop2005": 229, "Pop2015": 256, "Pop2025": 277 }, { "CountryName": "Brazil", "Pop1995": 161, "Pop2005": 186, "Pop2015": 204, "Pop2025": 218 } ];
$("#chart").igDataChart({ width: "100%", height: "400px", title: "Population per Country", subtitle: "Five largest projected populations for 2015", dataSource: data, axes: [ { name: "NameAxis", type: "categoryX", title: "Country", label: "CountryName" }, { name: "PopulationAxis", type: "numericY", minimumValue: 0, title: "Millions of People", } ], series: [ { name: "2015Population", type: "column", isHighlightingEnabled: true, isTransitionInEnabled: true, xAxis: "NameAxis", yAxis: "PopulationAxis", valueMemberPath: "Pop2015" } ] }); }); </script>
This works fine, but if I apply this in my project it return error "TypeError: closeIcon_.html(...).buttonMarkup is not a function", I am using infragistics igniteui 14.1.20141.2249.
Thanks for the sample project. Would you please give me an example in jquery format? It will be a great help for me, since I preffer to use jquery. Thanks
Hi Japz,
Please find attached MVC sample with a shared layout and igDataChart initialized in the Shared Laout. It runs fine. Please feel free to modify it so that it reproduces this error and send it back for investigation.
I use the sample code posted in http://www.igniteui.com/data-chart/overview, I want to create a customized form for igDataChart options inside my Master Page View, but I currently encounter the above error.
I am using Infragistics.Web.ClientUI infragistics.ext.js 14.1.20141.2249 in ASP.NET MVC 4 project, when I try to run my igDataChart page to Shared Layout the error occur but if i load the page in not Shared Layout it work perfectly. What should I do? Thanks