config/Options/shape/bubble.ts

  1. /**
  2. * Copyright (c) 2017 ~ present NAVER Corp.
  3. * billboard.js project is licensed under the MIT license
  4. */
  5. /**
  6. * bubble config options
  7. */
  8. export default {
  9. /**
  10. * Set bubble options
  11. * @name bubble
  12. * @memberof Options
  13. * @type {object}
  14. * @property {object} bubble bubble object
  15. * @property {number|Function} [bubble.maxR=35] Set the max bubble radius value
  16. * @property {boolean} [bubble.zerobased=false] Set if min or max value will be 0 on bubble chart.
  17. * @example
  18. * bubble: {
  19. * // ex) If 100 is the highest value among data bound, the representation bubble of 100 will have radius of 50.
  20. * // And the lesser will have radius relatively from tha max value.
  21. * maxR: 50,
  22. *
  23. * // or set radius callback
  24. * maxR: function(d) {
  25. * // ex. of d param - {x: Fri Oct 06 2017 00:00:00 GMT+0900, value: 80, id: "data2", index: 5}
  26. * ...
  27. * return Math.sqrt(d.value * 2);
  28. * },
  29. * zerobased: false
  30. * }
  31. */
  32. bubble_maxR: <number | (() => number)>35,
  33. bubble_zerobased: false
  34. };