Available in the Full Version

Category Chart - Titles

This is a basic example showing the category chart title and subtitle.

This sample is designed for a larger screen size.

On mobile, try rotating your screen, view full size, or email to another device.

This is a basic example showing the category chart title and subtitle.

Code View

Copy to Clipboard
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Category Chart Title and Subtitle</title>

    <script src="http://ajax.aspnetcdn.com/ajax/modernizr/modernizr-2.8.3.js"></script>
    <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
    <script src="http://code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script>

    <!-- Ignite UI for jQuery Required Combined CSS Files -->
    <link href="http://cdn-na.infragistics.com/igniteui/2024.2/latest/css/themes/infragistics/infragistics.theme.css" rel="stylesheet" />        
    <link href="http://cdn-na.infragistics.com/igniteui/2024.2/latest/css/structure/infragistics.css" rel="stylesheet" />
    
    <!-- Ignite UI for jQuery Required Combined JavaScript Files -->
    <script src="http://cdn-na.infragistics.com/igniteui/2024.2/latest/js/infragistics.core.js"></script>
    <script src="http://cdn-na.infragistics.com/igniteui/2024.2/latest/js/infragistics.dv.js"></script>

</head>
<body>
    <script type="text/javascript">
        var data = [
           { "Year": "1995", "China": 1297, "India": 920, "United States": 266 },
           { "Year": "2005", "China": 1216, "India": 1090, "United States": 295 },
           { "Year": "2010", "China": 1271, "India": 1131, "United States": 314 },
           { "Year": "2015", "China": 1361, "India": 1251, "United States": 322 },
           { "Year": "2020", "China": 1381, "India": 1341, "United States": 342 },
           { "Year": "2025", "China": 1394, "India": 1466, "United States": 361 }
        ];

        $(function () {
            $("#chart").igCategoryChart({
                dataSource: data,
                title: "A comparison of population over time",
                titleTextStyle: "12pt Verdana",
                titleTextColor: "#101010",
                subtitle: "A comparison of the population of Brazil, Indonesia, United States, India and China",
                subtitleTextColor: "#676666",
                subtitleTextStyle: "9pt Verdana",
            });
        });

    </script>

    <div id="chart" style="width:800px;height:400px"></div>
</body>
</html>