ConditionalStyleCollection.js 990 B

123456789101112131415161718192021222324252627282930313233
  1. 'use strict';
  2. /**
  3. * Licensed Materials - Property of IBM
  4. * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2016, 2019
  5. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  6. */
  7. define(['../../lib/@waca/dashboard-common/dist/core/Collection', './ConditionalStyle'], function (Collection, ConditionalStyle) {
  8. /**
  9. * Collection which holds onto Dataset models
  10. */
  11. var ConditionalStyleCollection = Collection.extend({
  12. // The class of objects that this collection manages
  13. modelClass: ConditionalStyle,
  14. init: function init(models, options) {
  15. ConditionalStyleCollection.inherited('init', this, [models, options]);
  16. },
  17. getColor: function getColor(index) {
  18. return index < this.size() ? this.getModels()[index] : null;
  19. },
  20. getColors: function getColors() {
  21. return this.getModels();
  22. }
  23. });
  24. return ConditionalStyleCollection;
  25. });
  26. //# sourceMappingURL=ConditionalStyleCollection.js.map