Hi Am getting exception like this

Unhandled exception at line 73, column 21 in http://localhost:4002/Home/Chart

0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'igCategoryChart'

Below is my code

<script src="@Url.Content("~/Scripts/jquery-1.8.2.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.6.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.24.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/js/infragistics.loader.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/dialog.js")" type="text/javascript"></script>

<link href="@Url.Content("~/js/jQueryContextMenu/jquery.contextMenu.css")" rel="stylesheet" type="text/css" />
@*<script src="@Url.Content("~/js/jQueryContextMenu/jquery.min.js")" type="text/javascript"></script>*@
<script src="@Url.Content("~/js/jQueryContextMenu/jquery.contextMenu.js")" type="text/javascript"></script>
<script src="@Url.Content("~/js/infragistics.core.js")" type="text/javascript"></script>
<script src="@Url.Content("~/js/infragistics.dv.js")" type="text/javascript"></script>

<script type="text/javascript">

$(function () {
//$.ig.loader(function () {
//scriptPath: './js/',
//cssPath: './css/',
//resources: 'igCategoryChart',
//ready: function () {
//$.getJSON("Home/GetChartData", null, function (data) {
// debugger;
//var jsondata = JSON.parse(data)
var data = [
{ "Label": "1995", "Brazil": 161, "Indonesia": 197, "United States": 266, "India": 920, "China": 1297 },
{ "Label": "2005", "Brazil": 186, "Indonesia": 229, "United States": 295, "India": 1090, "China": 1216 },
{ "Label": "2015", "Brazil": 204, "Indonesia": 256, "United States": 322, "India": 1251, "China": 1361 },
{ "Label": "2025", "Brazil": 218, "Indonesia": 277, "United States": 351, "India": 1396, "China": 1394 }
dataSource: data



function changeChartType() {
$("#Chart").igCategoryChart("option", "chartType", $("#chartTypePicker").val());

<span>Chart type:</span>

<select id="chartTypePicker" onchange="changeChartType()">
<option value="line">line</option>
<option value="column">column</option>
<option value="point">point</option>
<option value="area">area</option>
<option value="spline">spline</option>
<option value="splineArea">splineArea</option>
<option value="stepLine">stepLine</option>
<option value="stepArea">stepArea</option>
<div id="Chart" style="width:800px;height:400px"></div>

  • 8607
    Offline posted

    Hello Veenakumari,

    Could you please confirm that the local js references are for 16.2 Ignite UI?

    I've tried your code, combined with some of the basic structure of the data binding sample, and it works.  I'm using the CDN for the Ignite UI javascript and css files.  I've attached my sample.

    I'd recommend trying to swap out the local references for ones to the CDN and see what happens.  If it works with CDN, it might be caused by using a local version that doesn't have the category chart (new in 16.2).  If your local version is 16.2, I'd recommend providing the build number here so we can investigate.  Another thing to look into is which line your error points to.  The code you provided doesn't have a line 73, so that information would be helpful.

    Elizabeth Albert
    Localization Engineer