Question

I am running the below code, this is the sample code from the Infragistics SparkLineChart example:

 <!DOCTYPE html>
  <html>
   <head>
    <title></title>

    <!-- Ignite UI Required Combined CSS Files -->
    <link href="../../igniteui/css/themes/infragistics/infragistics.theme.css" rel="stylesheet" />
    <link href="../../igniteui/css/structure/infragistics.css" rel="stylesheet" />

    <script src="../../js/modernizr.min.js"></script>
    <script src="../../js/jquery.min.js"></script>
    <script src="../../js/jquery-ui.min.js"></script>

    <!-- Ignite UI Required Combined JavaScript Files -->
    <script src="../../igniteui/js/infragistics.core.js"></script>
    <script src="../../igniteui/js/infragistics.dv.js"></script>

  </head>
  <body>
    <!-- Target element for the igSparkline -->
    <div id="sparkline"></div>
    
    <!-- File supplying the northwindInvoices object for the igSparkline data source -->
    <script src="../../data-files/nw-invoices.js"></script>

    <script>

        $(function () {

            $("#sparkline").igSparkline({
                dataSource: northwindInvoices,
                height: "100px",
                width: "300px",
                valueMemberPath: 'ExtendedPrice',
                labelMemberPath: 'OrderDate',
                normalRangeVisibility: "visible",
                normalRangeMinimum: 200,
                normalRangeMaximum: 600,
                trendLineType: "simpleAverage"
            });

        });
    </script>       

</body>
</html>

I am getting the error below, when debugging it:

SCRIPT1009: Expected '}'

MyPage.html, line 39 character 4

enter image description here

Was it helpful?

Solution

Looking at the screenshot - There's a missing comma right at the end of

 labelMemberPath: 'OrderDate'

It's exactly like the error says and without the comma it can only be the last property for the object, thus it's expected next to close the definition with "}" at line 39 . Odd enough, your code above the screenshot looks correct.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top