DecoratorAPI.js 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. "use strict";
  2. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3. /**
  4. * Licensed Materials - Property of IBM
  5. * IBM Business Analytics (C) Copyright IBM Corp. 2018, 2019
  6. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. */
  8. /**
  9. * @class DecoratorAPI
  10. * @hideconstructor
  11. * @classdesc implementation of the DecoratorAPI interface.
  12. */
  13. define([], function () {
  14. var DecoratorAPI = function () {
  15. function DecoratorAPI() {
  16. _classCallCheck(this, DecoratorAPI);
  17. }
  18. /**
  19. * @function DecoratorAPI#decorateItem
  20. * @description Decorate an item in the visualization. After setting the decoration, {@link DecoratorAPI#renderDecorations} must be called to update the rendering.
  21. * The supported decorations are listed in Visualization.DECORATIONS.
  22. * @public
  23. *
  24. * @param {Number} itemIndex
  25. * @param {String} decoration
  26. * @param {Object} value
  27. *
  28. * @todo: is there a better name than "item" ?
  29. */
  30. DecoratorAPI.prototype.decorateItem = function decorateItem() /* itemIndex, decoration, value */{};
  31. /**
  32. * @function DecoratorAPI#decoratePoint
  33. * @description Decorate an datapoint in the visualization. After setting the decoration, {@link DecoratorAPI#renderDecorations} must be called to update the rendering.
  34. * The supported decorations are listed in Visualization.DECORATIONS.
  35. * @public
  36. *
  37. * @param {Number} rowIndex
  38. * @param {String} decoration
  39. * @param {Object} value
  40. *
  41. */
  42. DecoratorAPI.prototype.decoratePoint = function decoratePoint() /* rowIndex, decoration, value */{};
  43. /**
  44. * @function DecoratorAPI#decorate
  45. * @description Decorate the visualization. After setting the decoration, {@link DecoratorAPI#renderDecorations} must be called to update the rendering.
  46. * The supported decorations are listed in Visualization.DECORATIONS.
  47. * @public
  48. *
  49. * @param {String} decoration
  50. * @param {Object} value
  51. *
  52. */
  53. DecoratorAPI.prototype.decorate = function decorate() /* decoration, value */{};
  54. /**
  55. * @function DecoratorAPI#clearAllItemDecoration
  56. * @description Clear all the decorations associcated with all items. After setting the decoration, {@link DecoratorAPI#renderDecorations} must be called to update the rendering.
  57. * The supported decorations are listed in Visualization.DECORATIONS.
  58. * @public
  59. *
  60. * @param {String} decoration
  61. *
  62. */
  63. DecoratorAPI.prototype.clearAllItemDecoration = function clearAllItemDecoration() /* decoration */{};
  64. /**
  65. * @function DecoratorAPI#renderDecorations
  66. * @description renderDecorations - render the existing decoration that are set in the visualization.
  67. * @public
  68. */
  69. DecoratorAPI.prototype.renderDecorations = function renderDecorations() {};
  70. return DecoratorAPI;
  71. }();
  72. return DecoratorAPI;
  73. });
  74. //# sourceMappingURL=DecoratorAPI.js.map