1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ext JS PivotGrid Sample</title>
<!-- GC -->
<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="../shared/examples.css" />
<!-- ExtJS library: base/adapter -->
<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
<!-- ExtJS library: all widgets -->
<script type="text/javascript" src="../../ext-all.js"></script>
<script type="text/javascript" src="people.js"></script>
</head>
<body id="docbody">
<h1>Pivot Grid examples</h1>
<p>
This example shows how to create several PivotGrids using the same Store. In this case we have a dataset <br />
detailing the eye color, left/right handedness, height, gender, iq and birth decade of 800 (fictional) people.
</p>
<p><a href="people.js">The example code</a> is not minified, so it's readable. </p>
<h2>Counting occurrences</h2>
<p>Let's start simple with a count of the number of people born per decade.</p>
<div id="perDecade"></div>
<h2>Finding averages</h2>
<p>
PivotGrid can be used to easily find averages in large datasets. Here we ask it for the average height of people <br />
in each decade, broken down by gender and handedness.
</p>
<p>
In this example we also use a, turning our calculated heights (which are decimals) into feet and inches notation.
</p>
<div id="avgHeight"></div>
<h2>Finding maximums</h2>
<p>
It's also easy gather minimum and maximum values in PivotGrid. Here we determine the maximum IQ per birth decade and <br />
handedness. Note that we don't have to specify left <b>and</b> top axes - in this case we are summarizing purely through a top axis.
</p>
<div id="maxIQ"></div>
</body>
</html>
|