Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / docs / api / Ext.chart.Mask.html
1 <!DOCTYPE html><html><head><title>Ext.chart.Mask | Ext JS 4.0 Documentation</title><script type="text/javascript" src="../ext-all.js"></script><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../scrollbars.css" type="text/css"><link rel="stylesheet" href="../docs.css" type="text/css"><link id="styleCss" rel="stylesheet" href="../style.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script><link rel="stylesheet" href="../prettify.css" type="text/css"><!-- link(rel: 'stylesheet', href: req.baseURL + '/css/ext4.css', type: 'text/css')--><link rel="shortcut icon" type="image/ico" href="../favicon.ico"><!--[if IE]>
2 <style type="text/css">.head-band { display: none; }
3 .header { border: 0; top: 0; left: 0px; background: url(../header.gif) repeat-x; }
4 .doc-tab .members .member a.more { background-color: #efefef; }
5 </style><link rel="stylesheet" href="/new/css/ie.css" type="text/css"><![endif]-->
6 </head><body id="ext-body" class="iScroll"><div id="notice" class="notice">For up to date documentation and features, visit 
7 <a href="http://docs.sencha.com/ext-js/4-0">http://docs.sencha.com/ext-js/4-0</a></div><div class="wrapper"><div class="head-band"></div><div class="header"><h2><a href="../index.html">Sencha Documentation</a></h2></div><div id="search"><form><input type="text" placeholder="Search" id="search-field" autocomplete="off" name="q"></form><div id="search-box"></div></div><div id="treePanel"></div><div id="container"><script type="text/javascript">
8
9     req = {
10         liveURL: '.',
11         standAloneMode: true,
12         origDocClass: 'Ext.chart.Mask',
13         docClass: 'Ext.chart.Mask',
14         docReq: 'Ext.chart.Mask',
15         version: '4.0',
16         baseURL: '.',
17         baseDocURL: '.',
18         baseProdURL: '.'
19     };
20
21     clsInfo = {};
22
23
24
25 </script>
26
27 <script type="text/javascript" src="../search.js"></script>
28 <!--script type="text/javascript" src="/new/javascripts/app/examples.js"></script-->
29 <script type="text/javascript" src="../class_tree.js"></script>
30 <script type="text/javascript" src="../class_doc.js"></script>
31 <script type="text/javascript">
32     req.source = 'Mask.html#Ext-chart.Mask';
33     clsInfo = {"methods":["Mask"],"cfgs":[],"properties":[],"events":[],"subclasses":[]};
34     Ext.onReady(function() {
35         Ext.create('Docs.classPanel');
36     });
37 </script><div id="top-block" class="top-block"><h1 id="clsTitle" class="cls"><a href="../source/Mask.html#Ext-chart.Mask" target="_blank">Ext.chart.Mask</a></h1></div><div id="docContent"><div id="doc-overview-content"><div class="lft"><p>Defines a mask for a chart's series.
38 The 'chart' member must be set prior to rendering.</p>
39
40 <p>A Mask can be used to select a certain region in a chart.
41 When enabled, the <code>select</code> event will be triggered when a
42 region is selected by the mask, allowing the user to perform
43 other tasks like zooming on that region, etc.</p>
44
45 <p>In order to use the mask one has to set the Chart <code>mask</code> option to
46 <code>true</code>, <code>vertical</code> or <code>horizontal</code>. Then a possible configuration for the
47 listener could be:</p>
48
49 <pre class="prettyprint"><code>    items: {
50         xtype: 'chart',
51         animate: true,
52         store: store1,
53         mask: 'horizontal',
54         listeners: {
55             select: {
56                 fn: function(me, selection) {
57                     me.setZoom(selection);
58                     me.mask.hide();
59                 }
60             }
61         },
62 </code></pre>
63
64 <p>In this example we zoom the chart to that particular region. You can also get
65 a handle to a mask instance from the chart object. The <code>chart.mask</code> element is a
66 <code>Ext.Panel</code>.</p>
67 <div class="members"><div class="m-methods"><a name="methods"></a><div class="definedBy">Defined By</div><h3 class="mth p">Methods</h3><div id="method-Mask" class="member f ni"><a href="Ext.chart.Mask.html#method-Mask" rel="method-Mask" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.chart.Mask.html" class="definedIn docClass">Ext.chart.Mask</a><br/><a href="../source/Mask.html#Ext-chart.Mask-method-constructor" class="viewSource">view source</a></div><a name="Mask"></a><a name="method-Mask"></a><a href="Ext.chart.Mask.html#" rel="method-Mask" class="cls expand">Mask</a> : void</div><div class="description"><div class="short"><p>&nbsp;</p></div><div class="long">
68 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
69 </li></ul></div></div></div></div></div></div></div><div id="pageContent"></div></div></div></div></body></html>