KpiViewFactory.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. 'use strict';
  2. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3. /**
  4. *+------------------------------------------------------------------------+
  5. *| Licensed Materials - Property of IBM
  6. *| IBM Cognos Products: Dashboard
  7. *| (C) Copyright IBM Corp. 2019
  8. *|
  9. *| US Government Users Restricted Rights - Use, duplication or disclosure
  10. *| restricted by GSA ADP Schedule Contract with IBM Corp.
  11. *+------------------------------------------------------------------------+
  12. */
  13. define(['jquery', '../common/LabeledValueView', '../../../preview/LiveWidgetPreview'], function ($, LabeledValueView, LiveWidgetPreview) {
  14. var KpiViewFactory = function () {
  15. function KpiViewFactory() {
  16. _classCallCheck(this, KpiViewFactory);
  17. }
  18. /**
  19. * @description Create a sparkline view
  20. * @function KpiViewFactory#createSparklineView
  21. * @public
  22. *
  23. * @param {Object} options Options for the LiveWidgetPreview view
  24. */
  25. KpiViewFactory.prototype.createSparklineView = function createSparklineView(options) {
  26. return new LiveWidgetPreview(options);
  27. };
  28. /**
  29. * @description Create a LabeledValue view
  30. * @function KpiViewFactory#createLabeledValueView
  31. * @public
  32. *
  33. * @param {Object} options Options for the LabeledValueView view
  34. */
  35. KpiViewFactory.prototype.createLabeledValueView = function createLabeledValueView(options) {
  36. return new LabeledValueView(options);
  37. };
  38. return KpiViewFactory;
  39. }();
  40. return KpiViewFactory;
  41. });
  42. //# sourceMappingURL=KpiViewFactory.js.map