Available in the Full Version
Data Chart - Overview
The igDataChart is an HTML5 chart control built with performance in mind. It can
render very large data sets and includes
tooltips,
crosshairs,
gradients,
highlighting, and
animation functionality.
The igDataChart renders over 50 chart types including the following:
And many more features listed in the menu!
This sample uses CTP (Community Technical Preview) features. The API and behavior may change when these features are released with full support.
Population data from:
Quandl
This sample is designed for a larger screen size.
On mobile, try rotating your screen, view full size, or email to another device.
Code View
Copy to Clipboard
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 } ]; CreateChart("#columnChart", "column", "Column"); CreateChart("#pointChart", "point", "Point"); CreateChart("#lineChart", "line", "Line"); CreateChart("#splineChart", "spline", "Spline"); CreateChart("#areaChart", "area", "Area"); CreateChart("#splineAreaChart", "splineArea", "Spline Area"); CreateChart("#stepLineChart", "stepLine", "Step Line"); CreateChart("#stepAreaChart", "stepArea", "Step Area"); CreateChart("#waterfallChart", "waterfall", "Waterfall"); function CreateChart(chartID, seriesType, chartTitle) { $(chartID).igDataChart({ width: "250px", height: "250px", title: chartTitle, horizontalZoomable: true, verticalZoomable: true, dataSource: data, axes: [ { name: "xAxis", type: "categoryX", label: "Year", labelTextStyle: "8pt Verdana", }, { name: "yAxis", type: "numericY", minimumValue: 0, title: "Millions of People", labelTextStyle: "8pt Verdana", } ], series: [ CreateSeries(seriesType, "China"), CreateSeries(seriesType, "India"), CreateSeries(seriesType, "United States"), ] }); } function CreateSeries(seriesType, seriesMemberPath) { var thickness = 3; var markerType = "none"; if (seriesType == "column" || seriesType == "waterfall") { thickness = 1; } if (seriesType == "point") { markerType = "circle"; } var series = { type: seriesType, markerType: markerType, xAxis: "xAxis", yAxis: "yAxis", name: seriesMemberPath + "series", title: seriesMemberPath, valueMemberPath: seriesMemberPath, isTransitionInEnabled: true, isHighlightingEnabled: true, showTooltip: true, thickness: thickness } return series; }
<div> <div id="pointChart" class="chart"></div> <div id="lineChart" class="chart"></div> <div id="splineChart" class="chart"></div> <div id="columnChart" class="chart"></div> <div id="areaChart" class="chart"></div> <div id="splineAreaChart" class="chart"></div> <div id="waterfallChart" class="chart"></div> <div id="stepLineChart" class="chart"></div> <div id="stepAreaChart" class="chart"></div> <div class="Quandl-attribution"> Population data from: <a href="http://www.quandl.com/" target="_blank">Quandl</a> </div> </div>
.chart { display: inline-block; }
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Charts - Category Series</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.1/latest/css/themes/infragistics/infragistics.theme.css" rel="stylesheet" /> <link href="http://cdn-na.infragistics.com/igniteui/2024.1/latest/css/structure/infragistics.css" rel="stylesheet" /> <!-- Ignite UI for jQuery Required Combined JavaScript Files --> <script src="http://cdn-na.infragistics.com/igniteui/2024.1/latest/js/infragistics.core.js"></script> <script src="http://cdn-na.infragistics.com/igniteui/2024.1/latest/js/infragistics.dv.js"></script> </head> <body> <script type="text/javascript"> $(function () { 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 } ]; CreateChart("#columnChart", "column", "Column"); CreateChart("#pointChart", "point", "Point"); CreateChart("#lineChart", "line", "Line"); CreateChart("#splineChart", "spline", "Spline"); CreateChart("#areaChart", "area", "Area"); CreateChart("#splineAreaChart", "splineArea", "Spline Area"); CreateChart("#stepLineChart", "stepLine", "Step Line"); CreateChart("#stepAreaChart", "stepArea", "Step Area"); CreateChart("#waterfallChart", "waterfall", "Waterfall"); function CreateChart(chartID, seriesType, chartTitle) { $(chartID).igDataChart({ width: "250px", height: "250px", title: chartTitle, horizontalZoomable: true, verticalZoomable: true, dataSource: data, axes: [ { name: "xAxis", type: "categoryX", label: "Year", labelTextStyle: "8pt Verdana", }, { name: "yAxis", type: "numericY", minimumValue: 0, title: "Millions of People", labelTextStyle: "8pt Verdana", } ], series: [ CreateSeries(seriesType, "China"), CreateSeries(seriesType, "India"), CreateSeries(seriesType, "United States"), ] }); } function CreateSeries(seriesType, seriesMemberPath) { var thickness = 3; var markerType = "none"; if (seriesType == "column" || seriesType == "waterfall") { thickness = 1; } if (seriesType == "point") { markerType = "circle"; } var series = { type: seriesType, markerType: markerType, xAxis: "xAxis", yAxis: "yAxis", name: seriesMemberPath + "series", title: seriesMemberPath, valueMemberPath: seriesMemberPath, isTransitionInEnabled: true, isHighlightingEnabled: true, showTooltip: true, thickness: thickness } return series; } }); </script> <style> .chart { display: inline-block; } </style> <div> <div id="pointChart" class="chart"></div> <div id="lineChart" class="chart"></div> <div id="splineChart" class="chart"></div> <div id="columnChart" class="chart"></div> <div id="areaChart" class="chart"></div> <div id="splineAreaChart" class="chart"></div> <div id="waterfallChart" class="chart"></div> <div id="stepLineChart" class="chart"></div> <div id="stepAreaChart" class="chart"></div> <div class="Quandl-attribution"> Population data from: <a href="http://www.quandl.com/" target="_blank">Quandl</a> </div> </div> </body> </html>