-<!DOCTYPE html><html><head><title>Sencha Documentation Project</title><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../prettify.css" type="text/css"><link rel="stylesheet" href="../prettify_sa.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script></head><body onload="prettyPrint()"><pre class="prettyprint"><pre><span id='Ext-chart.Highlight'>/**
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>The source code</title>
+ <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+ <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
+ <style type="text/css">
+ .highlight { display: block; background-color: #ddd; }
+ </style>
+ <script type="text/javascript">
+ function highlight() {
+ document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
+ }
+ </script>
+</head>
+<body onload="prettyPrint(); highlight();">
+ <pre class="prettyprint lang-js"><span id='Ext-chart-Highlight'>/**
</span> * @class Ext.chart.Highlight
- * @ignore
+ * A mixin providing highlight functionality for Ext.chart.series.Series.
*/
Ext.define('Ext.chart.Highlight', {
/* End Definitions */
-<span id='Ext-chart.Highlight-property-highlight'> /**
+<span id='Ext-chart-Highlight-property-highlight'> /**
</span> * Highlight the given series item.
- * @param {Boolean|Object} Default's false. Can also be an object width style properties (i.e fill, stroke, radius)
+ * @param {Boolean/Object} Default's false. Can also be an object width style properties (i.e fill, stroke, radius)
* or just use default styles per series by setting highlight = true.
*/
highlight: false,
}
},
-<span id='Ext-chart.Highlight-method-highlightItem'> /**
+<span id='Ext-chart-Highlight-method-highlightItem'> /**
</span> * Highlight the given series item.
* @param {Object} item Info about the item; same format as returned by #getItemForPoint.
*/
opts = me.highlightCfg,
surface = me.chart.surface,
animate = me.chart.animate,
- p,
- from,
- to,
- pi;
+ p, from, to, pi;
if (!me.highlight || !sprite || sprite._highlighted) {
return;
}
sprite._highlighted = true;
if (!sprite._defaults) {
- sprite._defaults = Ext.apply(sprite._defaults || {},
- sprite.attr);
+ sprite._defaults = Ext.apply({}, sprite.attr);
from = {};
to = {};
for (p in opts) {
}
sprite._from = from;
sprite._to = to;
+ sprite._endStyle = to;
}
if (animate) {
sprite._anim = Ext.create('Ext.fx.Anim', {
}
},
-<span id='Ext-chart.Highlight-method-unHighlightItem'> /**
+<span id='Ext-chart-Highlight-method-unHighlightItem'> /**
</span> * Un-highlight any existing highlights
*/
unHighlightItem: function() {
opts = me.highlightCfg,
animate = me.chart.animate,
i = 0,
- obj,
- p,
- sprite;
+ obj, p, sprite;
for (; i < len; i++) {
if (!items[i]) {
}
}
if (animate) {
+ //sprite._to = obj;
+ sprite._endStyle = obj;
sprite._anim = Ext.create('Ext.fx.Anim', {
target: sprite,
to: obj,
}
}
}
-});</pre></pre></body></html>
\ No newline at end of file
+});</pre>
+</body>
+</html>