lollipop.src.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /* *
  2. *
  3. * (c) 2010-2019 Sebastian Bochan, Rafal Sebestjanski
  4. *
  5. * License: www.highcharts.com/license
  6. *
  7. * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
  8. *
  9. * */
  10. 'use strict';
  11. import H from '../parts/Globals.js';
  12. var seriesType = H.seriesType, areaProto = H.seriesTypes.area.prototype, colProto = H.seriesTypes.column.prototype;
  13. /**
  14. * The lollipop series is a carteseian series with a line anchored from
  15. * the x axis and a dot at the end to mark the value.
  16. * Requires `highcharts-more.js`, `modules/dumbbell.js` and
  17. * `modules/lollipop.js`.
  18. *
  19. * @sample {highcharts} highcharts/demo/lollipop/
  20. * Lollipop chart
  21. * @sample {highcharts} highcharts/series-dumbbell/styled-mode-dumbbell/
  22. * Styled mode
  23. *
  24. * @extends plotOptions.dumbbell
  25. * @product highcharts highstock
  26. * @excluding fillColor, fillOpacity, lineWidth, stack, stacking, lowColor,
  27. * stickyTracking, trackByArea
  28. * @since 8.0.0
  29. * @optionparent plotOptions.lollipop
  30. */
  31. seriesType('lollipop', 'dumbbell', {
  32. /** @ignore-option */
  33. lowColor: void 0,
  34. /** @ignore-option */
  35. threshold: 0,
  36. /** @ignore-option */
  37. connectorWidth: 1,
  38. /** @ignore-option */
  39. groupPadding: 0.2,
  40. /** @ignore-option */
  41. pointPadding: 0.1,
  42. /** @ignore-option */
  43. states: {
  44. hover: {
  45. /** @ignore-option */
  46. lineWidthPlus: 0,
  47. /** @ignore-option */
  48. connectorWidthPlus: 1,
  49. /** @ignore-option */
  50. halo: false
  51. }
  52. },
  53. tooltip: {
  54. pointFormat: '<span style="color:{series.color}">●</span> {series.name}: <b>{point.low}</b><br/>'
  55. }
  56. }, {
  57. translatePoint: areaProto.translate,
  58. drawPoint: areaProto.drawPoints,
  59. drawDataLabels: colProto.drawDataLabels,
  60. setShapeArgs: colProto.translate
  61. }, {
  62. pointSetState: areaProto.pointClass.prototype.setState,
  63. setState: H.seriesTypes.dumbbell.prototype.pointClass.prototype.setState
  64. });