1 |
efrain |
1 |
YUI.add('series-marker', function (Y, NAME) {
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Provides functionality for creating a marker series.
|
|
|
5 |
*
|
|
|
6 |
* @module charts
|
|
|
7 |
* @submodule series-marker
|
|
|
8 |
*/
|
|
|
9 |
/**
|
|
|
10 |
* The MarkerSeries class renders quantitative data by plotting relevant data points
|
|
|
11 |
* on a graph.
|
|
|
12 |
*
|
|
|
13 |
* @class MarkerSeries
|
|
|
14 |
* @extends CartesianSeries
|
|
|
15 |
* @uses Plots
|
|
|
16 |
* @constructor
|
|
|
17 |
* @param {Object} config (optional) Configuration parameters.
|
|
|
18 |
* @submodule series-marker
|
|
|
19 |
*/
|
|
|
20 |
Y.MarkerSeries = Y.Base.create("markerSeries", Y.CartesianSeries, [Y.Plots], {
|
|
|
21 |
/**
|
|
|
22 |
* @protected
|
|
|
23 |
*
|
|
|
24 |
* Method used by `styles` setter. Overrides base implementation.
|
|
|
25 |
*
|
|
|
26 |
* @method _setStyles
|
|
|
27 |
* @param {Object} newStyles Hash of properties to update.
|
|
|
28 |
* @return Object
|
|
|
29 |
*/
|
|
|
30 |
_setStyles: function(val)
|
|
|
31 |
{
|
|
|
32 |
if(!val.marker)
|
|
|
33 |
{
|
|
|
34 |
val = {marker:val};
|
|
|
35 |
}
|
|
|
36 |
val = this._parseMarkerStyles(val);
|
|
|
37 |
return Y.MarkerSeries.superclass._mergeStyles.apply(this, [val, this._getDefaultStyles()]);
|
|
|
38 |
}
|
|
|
39 |
},{
|
|
|
40 |
ATTRS : {
|
|
|
41 |
/**
|
|
|
42 |
* Read-only attribute indicating the type of series.
|
|
|
43 |
*
|
|
|
44 |
* @attribute type
|
|
|
45 |
* @type String
|
|
|
46 |
* @default marker
|
|
|
47 |
*/
|
|
|
48 |
type: {
|
|
|
49 |
value:"marker"
|
|
|
50 |
}
|
|
|
51 |
|
|
|
52 |
/**
|
|
|
53 |
* Style properties used for drawing markers. This attribute is inherited from `Renderer`. Below are the default
|
|
|
54 |
* values:
|
|
|
55 |
* <dl>
|
|
|
56 |
* <dt>fill</dt><dd>A hash containing the following values:
|
|
|
57 |
* <dl>
|
|
|
58 |
* <dt>color</dt><dd>Color of the fill. The default value is determined by the order of the series on
|
|
|
59 |
* the graph. The color will be retrieved from the below array:<br/>
|
|
|
60 |
* `["#6084d0", "#eeb647", "#6c6b5f", "#d6484f", "#ce9ed1", "#ff9f3b", "#93b7ff", "#e0ddd0", "#94ecba", "#309687"]`
|
|
|
61 |
* </dd>
|
|
|
62 |
* <dt>alpha</dt><dd>Number from 0 to 1 indicating the opacity of the marker fill. The default value is 1.</dd>
|
|
|
63 |
* </dl>
|
|
|
64 |
* </dd>
|
|
|
65 |
* <dt>border</dt><dd>A hash containing the following values:
|
|
|
66 |
* <dl>
|
|
|
67 |
* <dt>color</dt><dd>Color of the border. The default value is determined by the order of the series on
|
|
|
68 |
* the graph. The color will be retrieved from the below array:<br/>
|
|
|
69 |
* `["#205096", "#b38206", "#000000", "#94001e", "#9d6fa0", "#e55b00", "#5e85c9", "#adab9e", "#6ac291", "#006457"]`
|
|
|
70 |
* <dt>alpha</dt><dd>Number from 0 to 1 indicating the opacity of the marker border. The default value is 1.</dd>
|
|
|
71 |
* <dt>weight</dt><dd>Number indicating the width of the border. The default value is 1.</dd>
|
|
|
72 |
* </dl>
|
|
|
73 |
* </dd>
|
|
|
74 |
* <dt>width</dt><dd>indicates the width of the marker. The default value is 10.</dd>
|
|
|
75 |
* <dt>height</dt><dd>indicates the height of the marker The default value is 10.</dd>
|
|
|
76 |
* <dt>over</dt><dd>hash containing styles for markers when highlighted by a `mouseover` event. The default
|
|
|
77 |
* values for each style is null. When an over style is not set, the non-over value will be used. For example,
|
|
|
78 |
* the default value for `marker.over.fill.color` is equivalent to `marker.fill.color`.</dd>
|
|
|
79 |
* </dl>
|
|
|
80 |
*
|
|
|
81 |
* @attribute styles
|
|
|
82 |
* @type Object
|
|
|
83 |
*/
|
|
|
84 |
}
|
|
|
85 |
});
|
|
|
86 |
|
|
|
87 |
|
|
|
88 |
|
|
|
89 |
}, '3.18.1', {"requires": ["series-cartesian", "series-plot-util"]});
|