Getting Started

Performance !!!

Chart Data

Bar and Column Charts

Line and Area Charts

Pie and Funnel Charts

Scatter and Bubble Charts

Radar and Polar Charts

Financial Charts

Gantt Charts

Combinational Charts

Dynamic Charts

Working with Chart Axes

Chart Features

Customizing Chart

Client-Side Events


This sample demonstrates how to bind DataViz Chart to Json Data Source.

For detailed implementation, please take a look at the HTML code tab.
 
<!DOCTYPE html>
<html>
<head>
	<title>
	Binding to Data Source Example - JavaScript Chart by DataViz Charts
</title>
	<link rel="stylesheet" type="text/css" href="../../css/dataviz.chart.css" />
	<link rel="stylesheet" type="text/css" href="../../themes/le-frog/styles.css" />
	<script src="../../js/dataviz.chart.min.js" type="text/javascript"></script>
	
	<script lang="javascript" type="text/javascript">
		var model = [
            { date: "12/20/2012", value: 30 },
            { date: "12/21/2012", value: 50 },
            { date: "12/22/2012", value: 45 },
            { date: "12/23/2012", value: 40 },
            { date: "12/24/2012", value: 35 },
            { date: "12/25/2012", value: 30 },
            { date: "12/26/2012", value: 42 },
            { date: "12/27/2012", value: 40 },
            { date: "12/28/2012", value: 35 },
            { date: "12/29/2012", value: 43 },
            { date: "12/30/2012", value: 58 },
            { date: "12/31/2012", value: 60 }
		];

		var chart = new DataViz.Chart({
			title: { text: 'Binding to Data Source' },
			animation: { duration: 1 },
			shadows: {
				enabled: true
			},
			dataSource: model,
			series: [
				{
					type: 'column',
					xValuesField: {
						name: 'date',
						type: 'dateTime' // string, numeric, dateTime
					},
					yValuesField: 'value'
				}
			]
		});
		chart.write('container');
	</script>

</head>
<body>
	<div>
		<div id="container" style="width: 500px; height: 300px;">
		</div>
	</div>
</body>
</html>