[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 /* 2 YUI 3.17.2 (build 9c3c78e) 3 Copyright 2014 Yahoo! Inc. All rights reserved. 4 Licensed under the BSD License. 5 http://yuilibrary.com/license/ 6 */ 7 8 YUI.add('series-cartesian', function (Y, NAME) { 9 10 /** 11 * Provides functionality for creating a cartesian chart series. 12 * 13 * @module charts 14 * @submodule series-cartesian 15 */ 16 var Y_Lang = Y.Lang; 17 18 /** 19 * An abstract class for creating series instances with horizontal and vertical axes. 20 * CartesianSeries provides the core functionality used by the following classes: 21 * <ul> 22 * <li>{{#crossLink "LineSeries"}}{{/crossLink}}</li> 23 * <li>{{#crossLink "MarkerSeries"}}{{/crossLink}}</li> 24 * <li>{{#crossLink "AreaSeries"}}{{/crossLink}}</li> 25 * <li>{{#crossLink "SplineSeries"}}{{/crossLink}}</li> 26 * <li>{{#crossLink "AreaSplineSeries"}}{{/crossLink}}</li> 27 * <li>{{#crossLink "ComboSeries"}}{{/crossLink}}</li> 28 * <li>{{#crossLink "ComboSplineSeries"}}{{/crossLink}}</li> 29 * <li>{{#crossLink "Histogram"}}{{/crossLink}}</li> 30 * </ul> 31 * 32 * @class CartesianSeries 33 * @extends SeriesBase 34 * @constructor 35 * @param {Object} config (optional) Configuration parameters. 36 * @submodule series-base 37 */ 38 Y.CartesianSeries = Y.Base.create("cartesianSeries", Y.SeriesBase, [], { 39 /** 40 * Storage for `xDisplayName` attribute. 41 * 42 * @property _xDisplayName 43 * @type String 44 * @private 45 */ 46 _xDisplayName: null, 47 48 /** 49 * Storage for `yDisplayName` attribute. 50 * 51 * @property _yDisplayName 52 * @type String 53 * @private 54 */ 55 _yDisplayName: null, 56 57 /** 58 * Th x-coordinate for the left edge of the series. 59 * 60 * @property _leftOrigin 61 * @type String 62 * @private 63 */ 64 _leftOrigin: null, 65 66 /** 67 * The y-coordinate for the bottom edge of the series. 68 * 69 * @property _bottomOrigin 70 * @type String 71 * @private 72 */ 73 _bottomOrigin: null, 74 75 /** 76 * Adds event listeners. 77 * 78 * @method addListeners 79 * @private 80 */ 81 addListeners: function() 82 { 83 var xAxis = this.get("xAxis"), 84 yAxis = this.get("yAxis"); 85 if(xAxis) 86 { 87 this._xDataReadyHandle = xAxis.after("dataReady", Y.bind(this._xDataChangeHandler, this)); 88 this._xDataUpdateHandle = xAxis.after("dataUpdate", Y.bind(this._xDataChangeHandler, this)); 89 } 90 if(yAxis) 91 { 92 this._yDataReadyHandle = yAxis.after("dataReady", Y.bind(this._yDataChangeHandler, this)); 93 this._yDataUpdateHandle = yAxis.after("dataUpdate", Y.bind(this._yDataChangeHandler, this)); 94 } 95 this._xAxisChangeHandle = this.after("xAxisChange", this._xAxisChangeHandler); 96 this._yAxisChangeHandle = this.after("yAxisChange", this._yAxisChangeHandler); 97 this._stylesChangeHandle = this.after("stylesChange", function() { 98 var axesReady = this._updateAxisBase(); 99 if(axesReady) 100 { 101 this.draw(); 102 } 103 }); 104 this._widthChangeHandle = this.after("widthChange", function() { 105 var axesReady = this._updateAxisBase(); 106 if(axesReady) 107 { 108 this.draw(); 109 } 110 }); 111 this._heightChangeHandle = this.after("heightChange", function() { 112 var axesReady = this._updateAxisBase(); 113 if(axesReady) 114 { 115 this.draw(); 116 } 117 }); 118 this._visibleChangeHandle = this.after("visibleChange", this._handleVisibleChange); 119 }, 120 121 /** 122 * Event handler for the xAxisChange event. 123 * 124 * @method _xAxisChangeHandler 125 * @param {Object} e Event object. 126 * @private 127 */ 128 _xAxisChangeHandler: function() 129 { 130 var xAxis = this.get("xAxis"); 131 xAxis.after("dataReady", Y.bind(this._xDataChangeHandler, this)); 132 xAxis.after("dataUpdate", Y.bind(this._xDataChangeHandler, this)); 133 }, 134 135 /** 136 * Event handler the yAxisChange event. 137 * 138 * @method _yAxisChangeHandler 139 * @param {Object} e Event object. 140 * @private 141 */ 142 _yAxisChangeHandler: function() 143 { 144 var yAxis = this.get("yAxis"); 145 yAxis.after("dataReady", Y.bind(this._yDataChangeHandler, this)); 146 yAxis.after("dataUpdate", Y.bind(this._yDataChangeHandler, this)); 147 }, 148 149 /** 150 * Constant used to generate unique id. 151 * 152 * @property GUID 153 * @type String 154 * @private 155 */ 156 GUID: "yuicartesianseries", 157 158 /** 159 * Event handler for xDataChange event. 160 * 161 * @method _xDataChangeHandler 162 * @param {Object} event Event object. 163 * @private 164 */ 165 _xDataChangeHandler: function() 166 { 167 var axesReady = this._updateAxisBase(); 168 if(axesReady) 169 { 170 this.draw(); 171 } 172 }, 173 174 /** 175 * Event handler for yDataChange event. 176 * 177 * @method _yDataChangeHandler 178 * @param {Object} event Event object. 179 * @private 180 */ 181 _yDataChangeHandler: function() 182 { 183 var axesReady = this._updateAxisBase(); 184 if(axesReady) 185 { 186 this.draw(); 187 } 188 }, 189 190 /** 191 * Checks to ensure that both xAxis and yAxis data are available. If so, set the `xData` and `yData` attributes 192 * and return `true`. Otherwise, return `false`. 193 * 194 * @method _updateAxisBase 195 * @return Boolean 196 * @private 197 */ 198 _updateAxisBase: function() 199 { 200 var xAxis = this.get("xAxis"), 201 yAxis = this.get("yAxis"), 202 xKey = this.get("xKey"), 203 yKey = this.get("yKey"), 204 yData, 205 xData, 206 xReady, 207 yReady, 208 ready; 209 if(!xAxis || !yAxis || !xKey || !yKey) 210 { 211 ready = false; 212 } 213 else 214 { 215 xData = xAxis.getDataByKey(xKey); 216 yData = yAxis.getDataByKey(yKey); 217 if(Y_Lang.isArray(xKey)) 218 { 219 xReady = (xData && Y.Object.size(xData) > 0) ? this._checkForDataByKey(xData, xKey) : false; 220 } 221 else 222 { 223 xReady = xData ? true : false; 224 } 225 if(Y_Lang.isArray(yKey)) 226 { 227 yReady = (yData && Y.Object.size(yData) > 0) ? this._checkForDataByKey(yData, yKey) : false; 228 } 229 else 230 { 231 yReady = yData ? true : false; 232 } 233 ready = xReady && yReady; 234 if(ready) 235 { 236 this.set("xData", xData); 237 this.set("yData", yData); 238 } 239 } 240 return ready; 241 }, 242 243 /** 244 * Checks to see if all keys of a data object exist and contain data. 245 * 246 * @method _checkForDataByKey 247 * @param {Object} obj The object to check 248 * @param {Array} keys The keys to check 249 * @return Boolean 250 * @private 251 */ 252 _checkForDataByKey: function(obj, keys) 253 { 254 var i, 255 len = keys.length, 256 hasData = false; 257 for(i = 0; i < len; i = i + 1) 258 { 259 if(obj[keys[i]]) 260 { 261 hasData = true; 262 break; 263 } 264 } 265 return hasData; 266 }, 267 268 /** 269 * Draws the series is the xAxis and yAxis data are both available. 270 * 271 * @method validate 272 * @private 273 */ 274 validate: function() 275 { 276 if((this.get("xData") && this.get("yData")) || this._updateAxisBase()) 277 { 278 this.draw(); 279 } 280 else 281 { 282 this.fire("drawingComplete"); 283 } 284 }, 285 286 /** 287 * Calculates the coordinates for the series. 288 * 289 * @method setAreaData 290 * @protected 291 */ 292 setAreaData: function() 293 { 294 var w = this.get("width"), 295 h = this.get("height"), 296 xAxis = this.get("xAxis"), 297 yAxis = this.get("yAxis"), 298 xData = this._copyData(this.get("xData")), 299 yData = this._copyData(this.get("yData")), 300 direction = this.get("direction"), 301 dataLength = direction === "vertical" ? yData.length : xData.length, 302 xOffset = xAxis.getEdgeOffset(xAxis.getTotalMajorUnits(), w), 303 yOffset = yAxis.getEdgeOffset(yAxis.getTotalMajorUnits(), h), 304 padding = this.get("styles").padding, 305 leftPadding = padding.left, 306 topPadding = padding.top, 307 dataWidth = w - (leftPadding + padding.right + xOffset * 2), 308 dataHeight = h - (topPadding + padding.bottom + yOffset * 2), 309 xMax = xAxis.get("maximum"), 310 xMin = xAxis.get("minimum"), 311 yMax = yAxis.get("maximum"), 312 yMin = yAxis.get("minimum"), 313 graphic = this.get("graphic"), 314 yAxisType = yAxis.get("type"), 315 reverseYCoords = (yAxisType === "numeric" || yAxisType === "stacked"), 316 xcoords, 317 ycoords, 318 xOriginValue = xAxis.getOrigin(), 319 yOriginValue = yAxis.getOrigin(); 320 graphic.set("width", w); 321 graphic.set("height", h); 322 xOffset = xOffset + leftPadding; 323 yOffset = reverseYCoords ? yOffset + dataHeight + topPadding + padding.bottom : topPadding + yOffset; 324 this._leftOrigin = Math.round(xAxis._getCoordFromValue(xMin, xMax, dataWidth, xOriginValue, xOffset, false)); 325 this._bottomOrigin = Math.round(yAxis._getCoordFromValue(yMin, yMax, dataHeight, yOriginValue, yOffset, reverseYCoords)); 326 327 xcoords = this._getCoords(xMin, xMax, dataWidth, xData, xAxis, xOffset, false); 328 ycoords = this._getCoords(yMin, yMax, dataHeight, yData, yAxis, yOffset, reverseYCoords); 329 this.set("xcoords", xcoords); 330 this.set("ycoords", ycoords); 331 this._dataLength = dataLength; 332 this._setXMarkerPlane(xcoords, dataLength); 333 this._setYMarkerPlane(ycoords, dataLength); 334 }, 335 336 /** 337 * Returns either an array coordinates or an object key valued arrays of coordinates depending on the input. 338 * If the input data is an array, an array is returned. If the input data is an object, an object will be returned. 339 * 340 * @method _getCoords 341 * @param {Number} min The minimum value of the range of data. 342 * @param {Number} max The maximum value of the range of data. 343 * @param {Number} length The length, in pixels, of across which the coordinates will be calculated. 344 * @param {AxisBase} axis The axis in which the data is bound. 345 * @param {Number} offset The value in which to offet the first coordinate. 346 * @param {Boolean} reverse Indicates whether to calculate the coordinates in reverse order. 347 * @return Array|Object 348 * @private 349 */ 350 _getCoords: function(min, max, length, data, axis, offset, reverse) 351 { 352 var coords, 353 key; 354 if(Y_Lang.isArray(data)) 355 { 356 coords = axis._getCoordsFromValues(min, max, length, data, offset, reverse); 357 } 358 else 359 { 360 coords = {}; 361 for(key in data) 362 { 363 if(data.hasOwnProperty(key)) 364 { 365 coords[key] = this._getCoords.apply(this, [min, max, length, data[key], axis, offset, reverse]); 366 } 367 } 368 } 369 return coords; 370 }, 371 372 /** 373 * Used to cache xData and yData in the setAreaData method. Returns a copy of an 374 * array if an array is received as the param and returns an object literal of 375 * array copies if an object literal is received as the param. 376 * 377 * @method _copyData 378 * @param {Array|Object} val The object or array to be copied. 379 * @return Array|Object 380 * @private 381 */ 382 _copyData: function(val) 383 { 384 var copy, 385 key; 386 if(Y_Lang.isArray(val)) 387 { 388 copy = val.concat(); 389 } 390 else 391 { 392 copy = {}; 393 for(key in val) 394 { 395 if(val.hasOwnProperty(key)) 396 { 397 copy[key] = val[key].concat(); 398 } 399 } 400 } 401 return copy; 402 }, 403 404 /** 405 * Sets the marker plane for the series when the coords argument is an array. 406 * If the coords argument is an object literal no marker plane is set. 407 * 408 * @method _setXMarkerPlane 409 * @param {Array|Object} coords An array of x coordinates or an object literal 410 * containing key value pairs mapped to an array of coordinates. 411 * @param {Number} dataLength The length of data for the series. 412 * @private 413 */ 414 _setXMarkerPlane: function(coords, dataLength) 415 { 416 var i = 0, 417 xMarkerPlane = [], 418 xMarkerPlaneOffset = this.get("xMarkerPlaneOffset"), 419 nextX; 420 if(Y_Lang.isArray(coords)) 421 { 422 for(i = 0; i < dataLength; i = i + 1) 423 { 424 nextX = coords[i]; 425 xMarkerPlane.push({start:nextX - xMarkerPlaneOffset, end: nextX + xMarkerPlaneOffset}); 426 } 427 this.set("xMarkerPlane", xMarkerPlane); 428 } 429 }, 430 431 /** 432 * Sets the marker plane for the series when the coords argument is an array. 433 * If the coords argument is an object literal no marker plane is set. 434 * 435 * @method _setYMarkerPlane 436 * @param {Array|Object} coords An array of y coordinates or an object literal 437 * containing key value pairs mapped to an array of coordinates. 438 * @param {Number} dataLength The length of data for the series. 439 * @private 440 */ 441 _setYMarkerPlane: function(coords, dataLength) 442 { 443 var i = 0, 444 yMarkerPlane = [], 445 yMarkerPlaneOffset = this.get("yMarkerPlaneOffset"), 446 nextY; 447 if(Y_Lang.isArray(coords)) 448 { 449 for(i = 0; i < dataLength; i = i + 1) 450 { 451 nextY = coords[i]; 452 yMarkerPlane.push({start:nextY - yMarkerPlaneOffset, end: nextY + yMarkerPlaneOffset}); 453 } 454 this.set("yMarkerPlane", yMarkerPlane); 455 } 456 }, 457 458 /** 459 * Finds the first valid index of an array coordinates. 460 * 461 * @method _getFirstValidIndex 462 * @param {Array} coords An array of x or y coordinates. 463 * @return Number 464 * @private 465 */ 466 _getFirstValidIndex: function(coords) 467 { 468 var coord, 469 i = -1, 470 limit = coords.length; 471 while(!Y_Lang.isNumber(coord) && i < limit) 472 { 473 i += 1; 474 coord = coords[i]; 475 } 476 return i; 477 }, 478 479 /** 480 * Finds the last valid index of an array coordinates. 481 * 482 * @method _getLastValidIndex 483 * @param {Array} coords An array of x or y coordinates. 484 * @return Number 485 * @private 486 */ 487 _getLastValidIndex: function(coords) 488 { 489 var coord, 490 i = coords.length, 491 limit = -1; 492 while(!Y_Lang.isNumber(coord) && i > limit) 493 { 494 i -= 1; 495 coord = coords[i]; 496 } 497 return i; 498 }, 499 500 /** 501 * Draws the series. 502 * 503 * @method draw 504 * @protected 505 */ 506 draw: function() 507 { 508 var w = this.get("width"), 509 h = this.get("height"), 510 xcoords, 511 ycoords; 512 if(this.get("rendered")) 513 { 514 if((isFinite(w) && isFinite(h) && w > 0 && h > 0) && 515 ((this.get("xData") && this.get("yData")) || 516 this._updateAxisBase())) 517 { 518 if(this._drawing) 519 { 520 this._callLater = true; 521 return; 522 } 523 this._drawing = true; 524 this._callLater = false; 525 this.setAreaData(); 526 xcoords = this.get("xcoords"); 527 ycoords = this.get("ycoords"); 528 if(xcoords && ycoords && xcoords.length > 0) 529 { 530 this.drawSeries(); 531 } 532 this._drawing = false; 533 if(this._callLater) 534 { 535 this.draw(); 536 } 537 else 538 { 539 this._toggleVisible(this.get("visible")); 540 this.fire("drawingComplete"); 541 } 542 } 543 } 544 }, 545 546 /** 547 * Default value for plane offsets when the parent chart's `interactiveType` is `planar`. 548 * 549 * @property _defaultPlaneOffset 550 * @type Number 551 * @private 552 */ 553 _defaultPlaneOffset: 4, 554 555 /** 556 * Destructor implementation for the CartesianSeries class. 557 * Calls destroy on all Graphic instances. 558 * 559 * @method destructor 560 * @protected 561 */ 562 destructor: function() 563 { 564 if(this.get("rendered")) 565 { 566 if(this._xDataReadyHandle) 567 { 568 this._xDataReadyHandle.detach(); 569 } 570 if(this._xDataUpdateHandle) 571 { 572 this._xDataUpdateHandle.detach(); 573 } 574 if(this._yDataReadyHandle) 575 { 576 this._yDataReadyHandle.detach(); 577 } 578 if(this._yDataUpdateHandle) 579 { 580 this._yDataUpdateHandle.detach(); 581 } 582 if(this._xAxisChangeHandle) 583 { 584 this._xAxisChangeHandle.detach(); 585 } 586 if(this._yAxisChangeHandle) 587 { 588 this._yAxisChangeHandle.detach(); 589 } 590 } 591 } 592 /** 593 * Event handle for the x-axis' dataReady event. 594 * 595 * @property _xDataReadyHandle 596 * @type {EventHandle} 597 * @private 598 */ 599 600 /** 601 * Event handle for the x-axis dataUpdate event. 602 * 603 * @property _xDataUpdateHandle 604 * @type {EventHandle} 605 * @private 606 */ 607 608 /** 609 * Event handle for the y-axis dataReady event. 610 * 611 * @property _yDataReadyHandle 612 * @type {EventHandle} 613 * @private 614 */ 615 616 /** 617 * Event handle for the y-axis dataUpdate event. 618 * @property _yDataUpdateHandle 619 * @type {EventHandle} 620 * @private 621 */ 622 623 /** 624 * Event handle for the xAxisChange event. 625 * @property _xAxisChangeHandle 626 * @type {EventHandle} 627 * @private 628 */ 629 630 /** 631 * Event handle for the yAxisChange event. 632 * @property _yAxisChangeHandle 633 * @type {EventHandle} 634 * @private 635 */ 636 637 /** 638 * Event handle for the stylesChange event. 639 * @property _stylesChangeHandle 640 * @type {EventHandle} 641 * @private 642 */ 643 644 /** 645 * Event handle for the widthChange event. 646 * @property _widthChangeHandle 647 * @type {EventHandle} 648 * @private 649 */ 650 651 /** 652 * Event handle for the heightChange event. 653 * @property _heightChangeHandle 654 * @type {EventHandle} 655 * @private 656 */ 657 658 /** 659 * Event handle for the visibleChange event. 660 * @property _visibleChangeHandle 661 * @type {EventHandle} 662 * @private 663 */ 664 }, { 665 ATTRS: { 666 /** 667 * An array of all series of the same type used within a chart application. 668 * 669 * @attribute seriesTypeCollection 670 * @type Array 671 */ 672 seriesTypeCollection: {}, 673 674 /** 675 * Name used for for displaying data related to the x-coordinate. 676 * 677 * @attribute xDisplayName 678 * @type String 679 */ 680 xDisplayName: { 681 getter: function() 682 { 683 return this._xDisplayName || this.get("xKey"); 684 }, 685 686 setter: function(val) 687 { 688 this._xDisplayName = val.toString(); 689 return val; 690 } 691 }, 692 693 /** 694 * Name used for for displaying data related to the y-coordinate. 695 * 696 * @attribute yDisplayName 697 * @type String 698 */ 699 yDisplayName: { 700 getter: function() 701 { 702 return this._yDisplayName || this.get("yKey"); 703 }, 704 705 setter: function(val) 706 { 707 this._yDisplayName = val.toString(); 708 return val; 709 } 710 }, 711 712 /** 713 * Name used for for displaying category data 714 * 715 * @attribute categoryDisplayName 716 * @type String 717 * @readOnly 718 */ 719 categoryDisplayName: { 720 lazyAdd: false, 721 722 getter: function() 723 { 724 return this.get("direction") === "vertical" ? this.get("yDisplayName") : this.get("xDisplayName"); 725 }, 726 727 setter: function(val) 728 { 729 if(this.get("direction") === "vertical") 730 { 731 this._yDisplayName = val; 732 } 733 else 734 { 735 this._xDisplayName = val; 736 } 737 return val; 738 } 739 }, 740 741 /** 742 * Name used for for displaying value data 743 * 744 * @attribute valueDisplayName 745 * @type String 746 * @readOnly 747 */ 748 valueDisplayName: { 749 lazyAdd: false, 750 751 getter: function() 752 { 753 return this.get("direction") === "vertical" ? this.get("xDisplayName") : this.get("yDisplayName"); 754 }, 755 756 setter: function(val) 757 { 758 if(this.get("direction") === "vertical") 759 { 760 this._xDisplayName = val; 761 } 762 else 763 { 764 this._yDisplayName = val; 765 } 766 return val; 767 } 768 }, 769 770 /** 771 * Read-only attribute indicating the type of series. 772 * 773 * @attribute type 774 * @type String 775 * @default cartesian 776 */ 777 type: { 778 value: "cartesian" 779 }, 780 781 /** 782 * Order of this instance of this `type`. 783 * 784 * @attribute order 785 * @type Number 786 */ 787 order: {}, 788 789 /** 790 * Order of the instance 791 * 792 * @attribute graphOrder 793 * @type Number 794 */ 795 graphOrder: {}, 796 797 /** 798 * x coordinates for the series. 799 * 800 * @attribute xcoords 801 * @type Array 802 */ 803 xcoords: {}, 804 805 /** 806 * y coordinates for the series 807 * 808 * @attribute ycoords 809 * @type Array 810 */ 811 ycoords: {}, 812 813 /** 814 * Reference to the `Axis` instance used for assigning 815 * x-values to the graph. 816 * 817 * @attribute xAxis 818 * @type Axis 819 */ 820 xAxis: {}, 821 822 /** 823 * Reference to the `Axis` instance used for assigning 824 * y-values to the graph. 825 * 826 * @attribute yAxis 827 * @type Axis 828 */ 829 yAxis: {}, 830 831 /** 832 * Indicates which array to from the hash of value arrays in 833 * the x-axis `Axis` instance. 834 * 835 * @attribute xKey 836 * @type String 837 */ 838 xKey: { 839 setter: function(val) 840 { 841 if(Y_Lang.isArray(val)) 842 { 843 return val; 844 } 845 else 846 { 847 return val.toString(); 848 } 849 } 850 }, 851 852 /** 853 * Indicates which array to from the hash of value arrays in 854 * the y-axis `Axis` instance. 855 * 856 * @attribute yKey 857 * @type String 858 */ 859 yKey: { 860 setter: function(val) 861 { 862 if(Y_Lang.isArray(val)) 863 { 864 return val; 865 } 866 else 867 { 868 return val.toString(); 869 } 870 } 871 }, 872 873 /** 874 * Array of x values for the series. 875 * 876 * @attribute xData 877 * @type Array 878 */ 879 xData: {}, 880 881 /** 882 * Array of y values for the series. 883 * 884 * @attribute yData 885 * @type Array 886 */ 887 yData: {}, 888 889 /** 890 * Collection of area maps along the xAxis. Used to determine mouseover for multiple 891 * series. 892 * 893 * @attribute xMarkerPlane 894 * @type Array 895 */ 896 xMarkerPlane: {}, 897 898 /** 899 * Collection of area maps along the yAxis. Used to determine mouseover for multiple 900 * series. 901 * 902 * @attribute yMarkerPlane 903 * @type Array 904 */ 905 yMarkerPlane: {}, 906 907 /** 908 * Distance from a data coordinate to the left/right for setting a hotspot. 909 * 910 * @attribute xMarkerPlaneOffset 911 * @type Number 912 */ 913 xMarkerPlaneOffset: { 914 getter: function() { 915 var marker = this.get("styles").marker; 916 if(marker && marker.width && isFinite(marker.width)) 917 { 918 return marker.width * 0.5; 919 } 920 return this._defaultPlaneOffset; 921 } 922 }, 923 924 /** 925 * Distance from a data coordinate to the top/bottom for setting a hotspot. 926 * 927 * @attribute yMarkerPlaneOffset 928 * @type Number 929 */ 930 yMarkerPlaneOffset: { 931 getter: function() { 932 var marker = this.get("styles").marker; 933 if(marker && marker.height && isFinite(marker.height)) 934 { 935 return marker.height * 0.5; 936 } 937 return this._defaultPlaneOffset; 938 } 939 }, 940 941 /** 942 * Direction of the series 943 * 944 * @attribute direction 945 * @type String 946 */ 947 direction: { 948 value: "horizontal" 949 } 950 } 951 }); 952 953 954 }, '3.17.2', {"requires": ["series-base"]});
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |