@carbon/charts 0.41.60 → 0.41.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/CHANGELOG.md +31 -4
  2. package/axis-chart.js +2 -2
  3. package/axis-chart.js.map +1 -1
  4. package/build/demo/data/CHART_TYPES.d.ts +10 -0
  5. package/build/demo/data/bullet.d.ts +30 -0
  6. package/build/demo/data/circle-pack.d.ts +82 -0
  7. package/build/demo/data/index.d.ts +2 -0
  8. package/build/src/charts/bullet.d.ts +6 -0
  9. package/build/src/charts/circle-pack.d.ts +8 -0
  10. package/build/src/charts/index.d.ts +2 -0
  11. package/build/src/components/essentials/canvas-chart-clip.d.ts +6 -0
  12. package/build/src/components/graphs/bullet.d.ts +11 -0
  13. package/build/src/components/graphs/circle-pack.d.ts +17 -0
  14. package/build/src/components/index.d.ts +3 -0
  15. package/build/src/configuration-non-customizable.d.ts +39 -11
  16. package/build/src/configuration.d.ts +3 -1
  17. package/build/src/interfaces/axis-scales.d.ts +7 -0
  18. package/build/src/interfaces/charts.d.ts +23 -0
  19. package/build/src/interfaces/enums.d.ts +4 -2
  20. package/build/src/interfaces/events.d.ts +16 -0
  21. package/build/src/model-circle-pack.d.ts +26 -0
  22. package/build/src/services/canvas-zoom.d.ts +11 -0
  23. package/build/src/services/index.d.ts +1 -0
  24. package/bundle.js +1 -1
  25. package/chart.js +9 -3
  26. package/chart.js.map +1 -1
  27. package/charts/bullet.d.ts +6 -0
  28. package/charts/bullet.js +48 -0
  29. package/charts/bullet.js.map +1 -0
  30. package/charts/circle-pack.d.ts +8 -0
  31. package/charts/circle-pack.js +45 -0
  32. package/charts/circle-pack.js.map +1 -0
  33. package/charts/index.d.ts +2 -0
  34. package/charts/index.js +2 -0
  35. package/charts/index.js.map +1 -1
  36. package/components/axes/axis.js +5 -4
  37. package/components/axes/axis.js.map +1 -1
  38. package/components/axes/grid.js +2 -2
  39. package/components/axes/grid.js.map +1 -1
  40. package/components/essentials/canvas-chart-clip.d.ts +6 -0
  41. package/components/essentials/canvas-chart-clip.js +46 -0
  42. package/components/essentials/canvas-chart-clip.js.map +1 -0
  43. package/components/essentials/legend.js +39 -12
  44. package/components/essentials/legend.js.map +1 -1
  45. package/components/essentials/tooltip-axis.js +1 -1
  46. package/components/essentials/tooltip-axis.js.map +1 -1
  47. package/components/essentials/tooltip.js +6 -3
  48. package/components/essentials/tooltip.js.map +1 -1
  49. package/components/graphs/area-stacked.js +9 -6
  50. package/components/graphs/area-stacked.js.map +1 -1
  51. package/components/graphs/area.js +3 -1
  52. package/components/graphs/area.js.map +1 -1
  53. package/components/graphs/bar-simple.js +17 -3
  54. package/components/graphs/bar-simple.js.map +1 -1
  55. package/components/graphs/bar-stacked.js +1 -1
  56. package/components/graphs/bar-stacked.js.map +1 -1
  57. package/components/graphs/bubble.js +7 -6
  58. package/components/graphs/bubble.js.map +1 -1
  59. package/components/graphs/bullet.d.ts +11 -0
  60. package/components/graphs/bullet.js +360 -0
  61. package/components/graphs/bullet.js.map +1 -0
  62. package/components/graphs/circle-pack.d.ts +17 -0
  63. package/components/graphs/circle-pack.js +340 -0
  64. package/components/graphs/circle-pack.js.map +1 -0
  65. package/components/graphs/line.js +1 -1
  66. package/components/graphs/line.js.map +1 -1
  67. package/components/graphs/scatter-stacked.js +1 -1
  68. package/components/graphs/scatter-stacked.js.map +1 -1
  69. package/components/index.d.ts +3 -0
  70. package/components/index.js +3 -0
  71. package/components/index.js.map +1 -1
  72. package/configuration-non-customizable.d.ts +39 -11
  73. package/configuration-non-customizable.js +37 -13
  74. package/configuration-non-customizable.js.map +1 -1
  75. package/configuration.d.ts +3 -1
  76. package/configuration.js +27 -0
  77. package/configuration.js.map +1 -1
  78. package/demo/data/CHART_TYPES.d.ts +10 -0
  79. package/demo/data/CHART_TYPES.js +10 -0
  80. package/demo/data/CHART_TYPES.js.map +1 -1
  81. package/demo/data/bullet.d.ts +30 -0
  82. package/demo/data/bullet.js +75 -0
  83. package/demo/data/bullet.js.map +1 -0
  84. package/demo/data/bundle.js +1 -1
  85. package/demo/data/circle-pack.d.ts +82 -0
  86. package/demo/data/circle-pack.js +215 -0
  87. package/demo/data/circle-pack.js.map +1 -0
  88. package/demo/data/index.d.ts +2 -0
  89. package/demo/data/index.js +44 -5
  90. package/demo/data/index.js.map +1 -1
  91. package/demo/styles.css +308 -32
  92. package/demo/styles.css.map +1 -1
  93. package/demo/styles.min.css +1 -1
  94. package/demo/styles.min.css.map +1 -1
  95. package/demo/tsconfig.tsbuildinfo +32 -4
  96. package/interfaces/axis-scales.d.ts +7 -0
  97. package/interfaces/axis-scales.js.map +1 -1
  98. package/interfaces/charts.d.ts +23 -0
  99. package/interfaces/charts.js.map +1 -1
  100. package/interfaces/enums.d.ts +4 -2
  101. package/interfaces/enums.js +2 -0
  102. package/interfaces/enums.js.map +1 -1
  103. package/interfaces/events.d.ts +16 -0
  104. package/interfaces/events.js +18 -0
  105. package/interfaces/events.js.map +1 -1
  106. package/model-circle-pack.d.ts +26 -0
  107. package/model-circle-pack.js +137 -0
  108. package/model-circle-pack.js.map +1 -0
  109. package/package.json +1 -1
  110. package/services/canvas-zoom.d.ts +11 -0
  111. package/services/canvas-zoom.js +72 -0
  112. package/services/canvas-zoom.js.map +1 -0
  113. package/services/index.d.ts +1 -0
  114. package/services/index.js +1 -0
  115. package/services/index.js.map +1 -1
  116. package/services/scales-cartesian.js +13 -5
  117. package/services/scales-cartesian.js.map +1 -1
  118. package/styles/colors.scss +28 -0
  119. package/styles/components/_axis.scss +3 -1
  120. package/styles/components/_legend.scss +6 -0
  121. package/styles/components/_tooltip.scss +33 -10
  122. package/styles/graphs/_bullet.scss +67 -0
  123. package/styles/graphs/_circle-pack.scss +23 -0
  124. package/styles/graphs/index.scss +2 -0
  125. package/styles-g10.css +80 -8
  126. package/styles-g10.css.map +1 -1
  127. package/styles-g10.min.css +1 -1
  128. package/styles-g10.min.css.map +1 -1
  129. package/styles-g100.css +80 -8
  130. package/styles-g100.css.map +1 -1
  131. package/styles-g100.min.css +1 -1
  132. package/styles-g100.min.css.map +1 -1
  133. package/styles-g90.css +80 -8
  134. package/styles-g90.css.map +1 -1
  135. package/styles-g90.min.css +1 -1
  136. package/styles-g90.min.css.map +1 -1
  137. package/styles.css +80 -8
  138. package/styles.css.map +1 -1
  139. package/styles.min.css +1 -1
  140. package/styles.min.css.map +1 -1
  141. package/tsconfig.tsbuildinfo +212 -52
@@ -1 +1 @@
1
- {"version":3,"file":"enums.js","sourceRoot":"","sources":["enums.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,UAAU,CAAC;AACvC,MAAM,CAAC,IAAM,MAAM,GAAG,UAAU,CAAC;AAEjC;;GAEG;AACH,MAAM,CAAN,IAAY,UAKX;AALD,WAAY,UAAU;IACrB,iCAAmB,CAAA;IACnB,2BAAa,CAAA;IACb,yBAAW,CAAA;IACX,yBAAW,CAAA;AACZ,CAAC,EALW,UAAU,KAAV,UAAU,QAKrB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC9B,oCAAa,CAAA;IACb,wCAAiB,CAAA;IACjB,0CAAmB,CAAA;AACpB,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACxB,8BAAa,CAAA;IACb,gCAAe,CAAA;IACf,4BAAW,CAAA;IACX,kCAAiB,CAAA;AAClB,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACvB,yCAAyB,CAAA;IACzB,2CAA2B,CAAA;AAC5B,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IAC1B,wCAAqB,CAAA;IACrB,wCAAqB,CAAA;IACrB,4CAAyB,CAAA;I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b,aAAa,QAIxB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,UAQX;AARD,WAAY,UAAU;IACrB,iCAAmB,CAAA;IACnB,2BAAa,CAAA;IACb,uCAAyB,CAAA;IACzB,yCAA2B,CAAA;IAC3B,yCAA2B,CAAA;IAC3B,2BAAa,CAAA;IACb,2CAA6B,CAAA;AAC9B,CAAC,EARW,UAAU,KAAV,UAAU,QAQrB;AACD;;GAEG;AACH,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC9B,0CAAmB,CAAA;IACnB,4CAAqB,CAAA;IACrB,gDAAyB,CAAA;AAC1B,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B;AACD;;GAEG;AACH,MAAM,CAAN,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAChC,sCAAa,CAAA;IACb,wCAAe,CAAA;AAChB,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,QAGhC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAOX;AAPD,WAAY,cAAc;IACzB,uCAAqB,CAAA;IACrB,mCAAiB,CAAA;IACjB,+BAAa,CAAA;IACb,+BAAa,CAAA;IACb,+BAAa,CAAA;IACb,uCAAqB,CAAA;AACtB,CAAC,EAPW,cAAc,KAAd,cAAc,QAOzB","sourcesContent":["import * as EventEnums from './events';\nexport const Events = EventEnums;\n\n/**\n * enum of all supported chart themes\n */\nexport enum ChartTheme {\n\tDEFAULT = 'default',\n\tG100 = 'g100',\n\tG90 = 'g90',\n\tG10 = 'g10',\n}\n\n/**\n * enum of all color classname types\n */\nexport enum ColorClassNameTypes {\n\tFILL = 'fill',\n\tSTROKE = 'stroke',\n\tTOOLTIP = 'tooltip',\n}\n\n/**\n * enum of all possible axis positions\n */\nexport enum AxisPositions {\n\tLEFT = 'left',\n\tRIGHT = 'right',\n\tTOP = 'top',\n\tBOTTOM = 'bottom',\n}\n\n/**\n * enum of all possible axis positions\n */\nexport enum ZoomBarTypes {\n\tGRAPH_VIEW = 'graph_view',\n\tSLIDER_VIEW = 'slider_view',\n}\n\n/**\n * enum of all possible truncation types\n */\nexport enum TruncationTypes {\n\tEND_LINE = 'end_line',\n\tMID_LINE = 'mid_line',\n\tFRONT_LINE = 'front_line',\n\tNONE = 'none',\n}\n\n/**\n * enum of all possible cartesian orientations\n * to be used for determining the orientation\n * of graphs being draw over\n * cartesian scales\n */\nexport enum CartesianOrientations {\n\tVERTICAL = 'vertical',\n\tHORIZONTAL = 'horizontal',\n}\n\n/**\n * enum of all possible scale types\n */\nexport enum ScaleTypes {\n\tTIME = 'time',\n\tLINEAR = 'linear',\n\tLOG = 'log',\n\tLABELS = 'labels',\n}\n\n/**\n * enum of all possible legend positions\n */\nexport enum LegendPositions {\n\tRIGHT = 'right',\n\tLEFT = 'left',\n\tTOP = 'top',\n\tBOTTOM = 'bottom',\n}\n\n/**\n * enum of all possible alignments\n */\nexport enum Alignments {\n\tLEFT = 'left',\n\tCENTER = 'center',\n\tRIGHT = 'right',\n}\n\n/**\n * enum of all possible legend orientations\n */\nexport enum LegendOrientations {\n\tHORIZONTAL = 'horizontal',\n\tVERTICAL = 'vertical',\n}\n\n/**\n * enum of all possible layout directions\n */\nexport enum LayoutDirection {\n\tROW = 'row',\n\tCOLUMN = 'column',\n\tROW_REVERSE = 'row-reverse',\n\tCOLUMN_REVERSE = 'column-reverse',\n}\n\n/**\n * enum of all possible layout growth values\n */\nexport enum LayoutGrowth {\n\tFIXED = 'fixed',\n\tPREFERRED = 'preferred',\n\tSTRETCH = 'stretch',\n}\n\n/**\n * enum of all possible callout directions\n */\nexport enum CalloutDirections {\n\tLEFT = 'left',\n\tRIGHT = 'right',\n}\n\n/**\n * enum of all possible skeleton/empty state types\n */\nexport enum Skeletons {\n\tGRID = 'grid',\n\tVERT_OR_HORIZ = 'vertOrHoriz',\n\tPIE = 'pie',\n\tDONUT = 'donut',\n}\n\n/**\n * enum of all possible attributes used to aling text horizontally\n */\nexport enum TextAnchor {\n\tSTART = 'start',\n\tMIDDLE = 'middle',\n\tEND = 'end',\n}\n\n/**\n * enum of all possible attributes used to aling text vertically\n */\nexport enum DominantBaseline {\n\tBASELINE = 'baseline',\n\tMIDDLE = 'middle',\n\tHANGING = 'hanging',\n}\n\nexport enum GaugeTypes {\n\tSEMI = 'semi',\n\tFULL = 'full',\n}\n\n/**\n * enum of all possible callout directions\n */\nexport enum ArrowDirections {\n\tUP = 'up',\n\tDOWN = 'down',\n}\n\n/**\n * enum of carbon statuses\n */\nexport enum Statuses {\n\tSUCCESS = 'success',\n\tWARNING = 'warning',\n\tDANGER = 'danger',\n}\n\n/**\n * enum of axis ticks rotation\n */\nexport enum TickRotations {\n\tALWAYS = 'always',\n\tAUTO = 'auto',\n\tNEVER = 'never',\n}\n\n/**\n * enum of chartTypes that work with combo chart\n */\nexport enum ChartTypes {\n\tSCATTER = 'scatter',\n\tLINE = 'line',\n\tSIMPLE_BAR = 'simple-bar',\n\tSTACKED_BAR = 'stacked-bar',\n\tGROUPED_BAR = 'grouped-bar',\n\tAREA = 'area',\n\tSTACKED_AREA = 'stacked-area',\n}\n/**\n * enum of supported toolbar control types\n */\nexport enum ToolbarControlTypes {\n\tZOOM_IN = 'Zoom in',\n\tZOOM_OUT = 'Zoom out',\n\tRESET_ZOOM = 'Reset zoom',\n}\n/**\n * enum of title orientations for _vertical axes_\n */\nexport enum AxisTitleOrientations {\n\tLEFT = 'left',\n\tRIGHT = 'right',\n}\n\n/**\n * enum of legend item type\n */\nexport enum LegendItemType {\n\tCHECKBOX = 'checkbox',\n\tRADIUS = 'radius',\n\tAREA = 'area',\n\tSIZE = 'size',\n\tLINE = 'line',\n\tQUARTILE = 'quartile',\n}\n"]}
1
+ {"version":3,"file":"enums.js","sourceRoot":"","sources":["enums.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,UAAU,CAAC;AACvC,MAAM,CAAC,IAAM,MAAM,GAAG,UAAU,CAAC;AAEjC;;GAEG;AACH,MAAM,CAAN,IAAY,UAKX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,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAChC,sCAAa,CAAA;IACb,wCAAe,CAAA;AAChB,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,QAGhC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAQX;AARD,WAAY,cAAc;IACzB,uCAAqB,CAAA;IACrB,mCAAiB,CAAA;IACjB,+BAAa,CAAA;IACb,+BAAa,CAAA;IACb,+BAAa,CAAA;IACb,uCAAqB,CAAA;IACrB,+BAAa,CAAA;AACd,CAAC,EARW,cAAc,KAAd,cAAc,QAQzB","sourcesContent":["import * as EventEnums from './events';\nexport const Events = EventEnums;\n\n/**\n * enum of all supported chart themes\n */\nexport enum ChartTheme {\n\tDEFAULT = 'default',\n\tG100 = 'g100',\n\tG90 = 'g90',\n\tG10 = 'g10',\n}\n\n/**\n * enum of all color classname types\n */\nexport enum ColorClassNameTypes {\n\tFILL = 'fill',\n\tSTROKE = 'stroke',\n\tTOOLTIP = 'tooltip',\n}\n\n/**\n * enum of all possible axis positions\n */\nexport enum AxisPositions {\n\tLEFT = 'left',\n\tRIGHT = 'right',\n\tTOP = 'top',\n\tBOTTOM = 'bottom',\n}\n\n/**\n * enum of all possible axis positions\n */\nexport enum ZoomBarTypes {\n\tGRAPH_VIEW = 'graph_view',\n\tSLIDER_VIEW = 'slider_view',\n}\n\n/**\n * enum of all possible truncation types\n */\nexport enum TruncationTypes {\n\tEND_LINE = 'end_line',\n\tMID_LINE = 'mid_line',\n\tFRONT_LINE = 'front_line',\n\tNONE = 'none',\n}\n\n/**\n * enum of all possible cartesian orientations\n * to be used for determining the orientation\n * of graphs being draw over\n * cartesian scales\n */\nexport enum CartesianOrientations {\n\tVERTICAL = 'vertical',\n\tHORIZONTAL = 'horizontal',\n}\n\n/**\n * enum of all possible scale types\n */\nexport enum ScaleTypes {\n\tTIME = 'time',\n\tLINEAR = 'linear',\n\tLOG = 'log',\n\tLABELS = 'labels',\n\tLABELS_RATIO = 'labels-ratio',\n}\n\n/**\n * enum of all possible legend positions\n */\nexport enum LegendPositions {\n\tRIGHT = 'right',\n\tLEFT = 'left',\n\tTOP = 'top',\n\tBOTTOM = 'bottom',\n}\n\n/**\n * enum of all possible alignments\n */\nexport enum Alignments {\n\tLEFT = 'left',\n\tCENTER = 'center',\n\tRIGHT = 'right',\n}\n\n/**\n * enum of all possible legend orientations\n */\nexport enum LegendOrientations {\n\tHORIZONTAL = 'horizontal',\n\tVERTICAL = 'vertical',\n}\n\n/**\n * enum of all possible layout directions\n */\nexport enum LayoutDirection {\n\tROW = 'row',\n\tCOLUMN = 'column',\n\tROW_REVERSE = 'row-reverse',\n\tCOLUMN_REVERSE = 'column-reverse',\n}\n\n/**\n * enum of all possible layout growth values\n */\nexport enum LayoutGrowth {\n\tFIXED = 'fixed',\n\tPREFERRED = 'preferred',\n\tSTRETCH = 'stretch',\n}\n\n/**\n * enum of all possible callout directions\n */\nexport enum CalloutDirections {\n\tLEFT = 'left',\n\tRIGHT = 'right',\n}\n\n/**\n * enum of all possible skeleton/empty state types\n */\nexport enum Skeletons {\n\tGRID = 'grid',\n\tVERT_OR_HORIZ = 'vertOrHoriz',\n\tPIE = 'pie',\n\tDONUT = 'donut',\n}\n\n/**\n * enum of all possible attributes used to aling text horizontally\n */\nexport enum TextAnchor {\n\tSTART = 'start',\n\tMIDDLE = 'middle',\n\tEND = 'end',\n}\n\n/**\n * enum of all possible attributes used to aling text vertically\n */\nexport enum DominantBaseline {\n\tBASELINE = 'baseline',\n\tMIDDLE = 'middle',\n\tHANGING = 'hanging',\n}\n\nexport enum GaugeTypes {\n\tSEMI = 'semi',\n\tFULL = 'full',\n}\n\n/**\n * enum of all possible callout directions\n */\nexport enum ArrowDirections {\n\tUP = 'up',\n\tDOWN = 'down',\n}\n\n/**\n * enum of carbon statuses\n */\nexport enum Statuses {\n\tSUCCESS = 'success',\n\tWARNING = 'warning',\n\tDANGER = 'danger',\n}\n\n/**\n * enum of axis ticks rotation\n */\nexport enum TickRotations {\n\tALWAYS = 'always',\n\tAUTO = 'auto',\n\tNEVER = 'never',\n}\n\n/**\n * enum of chartTypes that work with combo chart\n */\nexport enum ChartTypes {\n\tSCATTER = 'scatter',\n\tLINE = 'line',\n\tSIMPLE_BAR = 'simple-bar',\n\tSTACKED_BAR = 'stacked-bar',\n\tGROUPED_BAR = 'grouped-bar',\n\tAREA = 'area',\n\tSTACKED_AREA = 'stacked-area',\n}\n/**\n * enum of supported toolbar control types\n */\nexport enum ToolbarControlTypes {\n\tZOOM_IN = 'Zoom in',\n\tZOOM_OUT = 'Zoom out',\n\tRESET_ZOOM = 'Reset zoom',\n}\n/**\n * enum of title orientations for _vertical axes_\n */\nexport enum AxisTitleOrientations {\n\tLEFT = 'left',\n\tRIGHT = 'right',\n}\n\n/**\n * enum of legend item type\n */\nexport enum LegendItemType {\n\tCHECKBOX = 'checkbox',\n\tRADIUS = 'radius',\n\tAREA = 'area',\n\tSIZE = 'size',\n\tLINE = 'line',\n\tQUARTILE = 'quartile',\n\tZOOM = 'zoom',\n}\n"]}
@@ -35,6 +35,13 @@ export declare enum ZoomBar {
35
35
  export declare enum ZoomDomain {
36
36
  CHANGE = "zoom-domain-change"
37
37
  }
38
+ /** enum of all events related to canvas zoom *
39
+ *
40
+ */
41
+ export declare enum CanvasZoom {
42
+ CANVAS_ZOOM_IN = "canvas-zoom-in",
43
+ CANVAS_ZOOM_OUT = "canvas-zoom-out"
44
+ }
38
45
  /**
39
46
  * enum of all axis-related events
40
47
  */
@@ -162,3 +169,12 @@ export declare enum Legend {
162
169
  ITEM_MOUSEOUT = "legend-item-onmouseout",
163
170
  ITEMS_UPDATE = "legend-items-update"
164
171
  }
172
+ /**
173
+ * enum of all circlepack related events
174
+ */
175
+ export declare enum CirclePack {
176
+ CIRCLE_MOUSEOVER = "circle-leaf-mouseover",
177
+ CIRCLE_CLICK = "circle-leaf-click",
178
+ CIRCLE_MOUSEOUT = "circle-leaf-mouseout",
179
+ CIRCLE_MOUSEMOVE = "circle-leaf-mousemove"
180
+ }
@@ -42,6 +42,14 @@ export var ZoomDomain;
42
42
  (function (ZoomDomain) {
43
43
  ZoomDomain["CHANGE"] = "zoom-domain-change";
44
44
  })(ZoomDomain || (ZoomDomain = {}));
45
+ /** enum of all events related to canvas zoom *
46
+ *
47
+ */
48
+ export var CanvasZoom;
49
+ (function (CanvasZoom) {
50
+ CanvasZoom["CANVAS_ZOOM_IN"] = "canvas-zoom-in";
51
+ CanvasZoom["CANVAS_ZOOM_OUT"] = "canvas-zoom-out";
52
+ })(CanvasZoom || (CanvasZoom = {}));
45
53
  /**
46
54
  * enum of all axis-related events
47
55
  */
@@ -183,4 +191,14 @@ export var Legend;
183
191
  Legend["ITEM_MOUSEOUT"] = "legend-item-onmouseout";
184
192
  Legend["ITEMS_UPDATE"] = "legend-items-update";
185
193
  })(Legend || (Legend = {}));
194
+ /**
195
+ * enum of all circlepack related events
196
+ */
197
+ export var CirclePack;
198
+ (function (CirclePack) {
199
+ CirclePack["CIRCLE_MOUSEOVER"] = "circle-leaf-mouseover";
200
+ CirclePack["CIRCLE_CLICK"] = "circle-leaf-click";
201
+ CirclePack["CIRCLE_MOUSEOUT"] = "circle-leaf-mouseout";
202
+ CirclePack["CIRCLE_MOUSEMOVE"] = "circle-leaf-mousemove";
203
+ })(CirclePack || (CirclePack = {}));
186
204
  //# sourceMappingURL=../../src/interfaces/events.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","sourceRoot":"","sources":["events.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,KAOX;AAPD,WAAY,KAAK;IAChB,4CAAmC,CAAA;IACnC,gCAAuB,CAAA;IACvB,sCAA6B,CAAA;IAC7B,iCAAiC;IACjC,yBAAyB;IACzB,oCAA2B,CAAA;AAC5B,CAAC,EAPW,KAAK,KAAL,KAAK,QAOhB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,KAEX;AAFD,WAAY,KAAK;IAChB,gCAAuB,CAAA;AACxB,CAAC,EAFW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ACjC,4CAAiC,CAAA;IACjC,oCAAyB,CAAA;IACzB,0CAA+B,CAAA;AAChC,CAAC,EALW,OAAO,KAAP,OAAO,QAKlB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,OAIX;AAJD,WAAY,OAAO;IAClB,gCAAqB,CAAA;IACrB,gCAAqB,CAAA;IACrB,gCAAqB,CAAA;AACtB,CAAC,EAJW,OAAO,KAAP,OAAO,QAIlB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACpB,oCAAuB,CAAA;IACvB,oCAAuB,CAAA;AACxB,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,MAKX;AALD,WAAY,MAAM;IACjB,4CAAkC,CAAA;IAClC,4CAAkC,CAAA;IAClC,kDAAwC,CAAA;IACxC,8CAAoC,CAAA;AACrC,CAAC,EALW,MAAM,KAAN,MAAM,QAKjB","sourcesContent":["/**\n * enum of all events related to the chart on the DOM\n */\nexport enum Chart {\n\tRENDER_FINISHED = 'render-finished',\n\tRESIZE = 'chart-resize',\n\tMOUSEOVER = 'chart-mouseover',\n\t// MOUSEMOVE = \"chart-mousemove\",\n\t// CLICK = \"chart-click\",\n\tMOUSEOUT = 'chart-mouseout',\n}\n\n/**\n * enum of all events related to the chart model\n */\nexport enum Model {\n\tUPDATE = 'model-update',\n}\n\n/**\n * enum of all toolbar events\n */\nexport enum Toolbar {\n\tSHOW_OVERFLOW_MENU = 'show-toolbar-overflow-menu',\n\tHIDE_OVERFLOW_MENU = 'hide-toolbar-overflow-menu',\n}\n\n/**\n * enum of all events related to the zoom-bar\n */\nexport enum ZoomBar {\n\tUPDATE = 'zoom-bar-update',\n\tSELECTION_START = 'zoom-bar-selection-start',\n\tSELECTION_IN_PROGRESS = 'zoom-bar-selection-in-progress',\n\tSELECTION_END = 'zoom-bar-selection-end',\n}\n\n/**\n * enum of all events related to the zoom domain\n */\nexport enum ZoomDomain {\n\tCHANGE = 'zoom-domain-change',\n}\n\n/**\n * enum of all axis-related events\n */\nexport enum Axis {\n\tLABEL_MOUSEOVER = 'axis-label-mouseover',\n\tLABEL_MOUSEMOVE = 'axis-label-mousemove',\n\tLABEL_CLICK = 'axis-label-click',\n\tLABEL_MOUSEOUT = 'axis-label-mouseout',\n}\n\n/**\n * enum of all area graph events\n */\nexport enum Area {\n\tAREA_MOUSEOVER = 'area-mouseover',\n\tAREA_MOUSEMOVE = 'area-mousemove',\n\tAREA_CLICK = 'area-click',\n\tAREA_MOUSEOUT = 'area-mouseout',\n}\n\n/**\n * enum of all wordcloud graph events\n */\nexport enum WordCloud {\n\tWORD_MOUSEOVER = 'wordcloud-word-mouseover',\n\tWORD_MOUSEMOVE = 'wordcloud-word-mousemove',\n\tWORD_CLICK = 'wordcloud-word-click',\n\tWORD_MOUSEOUT = 'wordcloud-word-mouseout',\n}\n\n/**\n * enum of all pie graph events\n */\nexport enum Pie {\n\tSLICE_MOUSEOVER = 'pie-slice-mouseover',\n\tSLICE_MOUSEMOVE = 'pie-slice-mousemove',\n\tSLICE_CLICK = 'pie-slice-click',\n\tSLICE_MOUSEOUT = 'pie-slice-mouseout',\n}\n\n/**\n * enum of all gauge graph events\n */\nexport enum Gauge {\n\tARC_MOUSEOVER = 'gauge-arc-mouseover',\n\tARC_MOUSEMOVE = 'gauge-arc-mousemove',\n\tARC_CLICK = 'gauge-arc-click',\n\tARC_MOUSEOUT = 'gauge-arc-mouseout',\n}\n\n/**\n * enum of all bar graph events\n */\nexport enum Bar {\n\tBAR_MOUSEOVER = 'bar-mouseover',\n\tBAR_MOUSEMOVE = 'bar-mousemove',\n\tBAR_CLICK = 'bar-click',\n\tBAR_MOUSEOUT = 'bar-mouseout',\n}\n\n/**\n * enum of all boxplot graph events\n */\nexport enum Boxplot {\n\tBOX_MOUSEOVER = 'box-mouseover',\n\tBOX_MOUSEMOVE = 'box-mousemove',\n\tBOX_CLICK = 'box-click',\n\tBOX_MOUSEOUT = 'box-mouseout',\n\tOUTLIER_MOUSEOVER = 'outlier-mouseover',\n\tOUTLIER_MOUSEMOVE = 'outlier-mousemove',\n\tOUTLIER_CLICK = 'outlier-click',\n\tOUTLIER_MOUSEOUT = 'outlier-mouseout',\n}\n\n/**\n * enum of all scatter graph events\n */\nexport enum Scatter {\n\tSCATTER_MOUSEOVER = 'scatter-mouseover',\n\tSCATTER_MOUSEMOVE = 'scatter-mousemove',\n\tSCATTER_CLICK = 'scatter-click',\n\tSCATTER_MOUSEOUT = 'scatter-mouseout',\n}\n\n/**\n * enum of all line graph events\n */\nexport enum Line {\n\tPOINT_MOUSEOVER = 'scatter-mouseover',\n\tPOINT_MOUSEMOVE = 'scatter-mousemove',\n\tPOINT_CLICK = 'scatter-click',\n\tPOINT_MOUSEOUT = 'scatter-mouseout',\n}\n\n/**\n * enum of all radar graph events\n */\nexport enum Radar {\n\tX_AXIS_MOUSEOVER = 'radar-x-axis-mouseover',\n\tX_AXIS_MOUSEMOVE = 'radar-x-axis-mousemove',\n\tX_AXIS_CLICK = 'radar-x-axis-click',\n\tX_AXIS_MOUSEOUT = 'radar-x-axis-mouseout',\n}\n\n/**\n * enum of all treemap graph events\n */\nexport enum Treemap {\n\tLEAF_MOUSEOVER = 'leaf-mouseover',\n\tLEAF_MOUSEMOVE = 'leaf-mousemove',\n\tLEAF_CLICK = 'leaf-click',\n\tLEAF_MOUSEOUT = 'leaf-mouseout',\n}\n\n/**\n * enum of all tooltip events\n */\nexport enum Tooltip {\n\tSHOW = 'show-tooltip',\n\tMOVE = 'move-tooltip',\n\tHIDE = 'hide-tooltip',\n}\n\n/**\n * enum of all threshold events\n */\nexport enum Threshold {\n\tSHOW = 'show-threshold',\n\tHIDE = 'hide-threshold',\n}\n\n/**\n * enum of all legend related events\n */\nexport enum Legend {\n\tITEM_HOVER = 'legend-item-onhover',\n\tITEM_CLICK = 'legend-item-onclick',\n\tITEM_MOUSEOUT = 'legend-item-onmouseout',\n\tITEMS_UPDATE = 'legend-items-update',\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A;IACxC,wDAA0C,CAAA;AAC3C,CAAC,EALW,UAAU,KAAV,UAAU,QAKrB","sourcesContent":["/**\n * enum of all events related to the chart on the DOM\n */\nexport enum Chart {\n\tRENDER_FINISHED = 'render-finished',\n\tRESIZE = 'chart-resize',\n\tMOUSEOVER = 'chart-mouseover',\n\t// MOUSEMOVE = \"chart-mousemove\",\n\t// CLICK = \"chart-click\",\n\tMOUSEOUT = 'chart-mouseout',\n}\n\n/**\n * enum of all events related to the chart model\n */\nexport enum Model {\n\tUPDATE = 'model-update',\n}\n\n/**\n * enum of all toolbar events\n */\nexport enum Toolbar {\n\tSHOW_OVERFLOW_MENU = 'show-toolbar-overflow-menu',\n\tHIDE_OVERFLOW_MENU = 'hide-toolbar-overflow-menu',\n}\n\n/**\n * enum of all events related to the zoom-bar\n */\nexport enum ZoomBar {\n\tUPDATE = 'zoom-bar-update',\n\tSELECTION_START = 'zoom-bar-selection-start',\n\tSELECTION_IN_PROGRESS = 'zoom-bar-selection-in-progress',\n\tSELECTION_END = 'zoom-bar-selection-end',\n}\n\n/**\n * enum of all events related to the zoom domain\n */\nexport enum ZoomDomain {\n\tCHANGE = 'zoom-domain-change',\n}\n\n/** enum of all events related to canvas zoom *\n *\n */\nexport enum CanvasZoom {\n\tCANVAS_ZOOM_IN = 'canvas-zoom-in',\n\tCANVAS_ZOOM_OUT = 'canvas-zoom-out',\n}\n\n/**\n * enum of all axis-related events\n */\nexport enum Axis {\n\tLABEL_MOUSEOVER = 'axis-label-mouseover',\n\tLABEL_MOUSEMOVE = 'axis-label-mousemove',\n\tLABEL_CLICK = 'axis-label-click',\n\tLABEL_MOUSEOUT = 'axis-label-mouseout',\n}\n\n/**\n * enum of all area graph events\n */\nexport enum Area {\n\tAREA_MOUSEOVER = 'area-mouseover',\n\tAREA_MOUSEMOVE = 'area-mousemove',\n\tAREA_CLICK = 'area-click',\n\tAREA_MOUSEOUT = 'area-mouseout',\n}\n\n/**\n * enum of all wordcloud graph events\n */\nexport enum WordCloud {\n\tWORD_MOUSEOVER = 'wordcloud-word-mouseover',\n\tWORD_MOUSEMOVE = 'wordcloud-word-mousemove',\n\tWORD_CLICK = 'wordcloud-word-click',\n\tWORD_MOUSEOUT = 'wordcloud-word-mouseout',\n}\n\n/**\n * enum of all pie graph events\n */\nexport enum Pie {\n\tSLICE_MOUSEOVER = 'pie-slice-mouseover',\n\tSLICE_MOUSEMOVE = 'pie-slice-mousemove',\n\tSLICE_CLICK = 'pie-slice-click',\n\tSLICE_MOUSEOUT = 'pie-slice-mouseout',\n}\n\n/**\n * enum of all gauge graph events\n */\nexport enum Gauge {\n\tARC_MOUSEOVER = 'gauge-arc-mouseover',\n\tARC_MOUSEMOVE = 'gauge-arc-mousemove',\n\tARC_CLICK = 'gauge-arc-click',\n\tARC_MOUSEOUT = 'gauge-arc-mouseout',\n}\n\n/**\n * enum of all bar graph events\n */\nexport enum Bar {\n\tBAR_MOUSEOVER = 'bar-mouseover',\n\tBAR_MOUSEMOVE = 'bar-mousemove',\n\tBAR_CLICK = 'bar-click',\n\tBAR_MOUSEOUT = 'bar-mouseout',\n}\n\n/**\n * enum of all boxplot graph events\n */\nexport enum Boxplot {\n\tBOX_MOUSEOVER = 'box-mouseover',\n\tBOX_MOUSEMOVE = 'box-mousemove',\n\tBOX_CLICK = 'box-click',\n\tBOX_MOUSEOUT = 'box-mouseout',\n\tOUTLIER_MOUSEOVER = 'outlier-mouseover',\n\tOUTLIER_MOUSEMOVE = 'outlier-mousemove',\n\tOUTLIER_CLICK = 'outlier-click',\n\tOUTLIER_MOUSEOUT = 'outlier-mouseout',\n}\n\n/**\n * enum of all scatter graph events\n */\nexport enum Scatter {\n\tSCATTER_MOUSEOVER = 'scatter-mouseover',\n\tSCATTER_MOUSEMOVE = 'scatter-mousemove',\n\tSCATTER_CLICK = 'scatter-click',\n\tSCATTER_MOUSEOUT = 'scatter-mouseout',\n}\n\n/**\n * enum of all line graph events\n */\nexport enum Line {\n\tPOINT_MOUSEOVER = 'scatter-mouseover',\n\tPOINT_MOUSEMOVE = 'scatter-mousemove',\n\tPOINT_CLICK = 'scatter-click',\n\tPOINT_MOUSEOUT = 'scatter-mouseout',\n}\n\n/**\n * enum of all radar graph events\n */\nexport enum Radar {\n\tX_AXIS_MOUSEOVER = 'radar-x-axis-mouseover',\n\tX_AXIS_MOUSEMOVE = 'radar-x-axis-mousemove',\n\tX_AXIS_CLICK = 'radar-x-axis-click',\n\tX_AXIS_MOUSEOUT = 'radar-x-axis-mouseout',\n}\n\n/**\n * enum of all treemap graph events\n */\nexport enum Treemap {\n\tLEAF_MOUSEOVER = 'leaf-mouseover',\n\tLEAF_MOUSEMOVE = 'leaf-mousemove',\n\tLEAF_CLICK = 'leaf-click',\n\tLEAF_MOUSEOUT = 'leaf-mouseout',\n}\n\n/**\n * enum of all tooltip events\n */\nexport enum Tooltip {\n\tSHOW = 'show-tooltip',\n\tMOVE = 'move-tooltip',\n\tHIDE = 'hide-tooltip',\n}\n\n/**\n * enum of all threshold events\n */\nexport enum Threshold {\n\tSHOW = 'show-threshold',\n\tHIDE = 'hide-threshold',\n}\n\n/**\n * enum of all legend related events\n */\nexport enum Legend {\n\tITEM_HOVER = 'legend-item-onhover',\n\tITEM_CLICK = 'legend-item-onclick',\n\tITEM_MOUSEOUT = 'legend-item-onmouseout',\n\tITEMS_UPDATE = 'legend-items-update',\n}\n\n/**\n * enum of all circlepack related events\n */\nexport enum CirclePack {\n\tCIRCLE_MOUSEOVER = 'circle-leaf-mouseover',\n\tCIRCLE_CLICK = 'circle-leaf-click',\n\tCIRCLE_MOUSEOUT = 'circle-leaf-mouseout',\n\tCIRCLE_MOUSEMOVE = 'circle-leaf-mousemove',\n}\n"]}
@@ -0,0 +1,26 @@
1
+ import { ChartModel } from './model';
2
+ import { LegendItemType } from './interfaces/enums';
3
+ /** The charting model layer which includes mainly the chart data and options,
4
+ * as well as some misc. information to be shared among components */
5
+ export declare class CirclePackChartModel extends ChartModel {
6
+ parentNode: boolean;
7
+ constructor(services: any);
8
+ setData(newData: any): void;
9
+ setOptions(newOptions: any): void;
10
+ getZoomOptions(options?: any): {
11
+ legend?: undefined;
12
+ } | {
13
+ legend: {
14
+ additionalItems: {
15
+ type: LegendItemType;
16
+ name: string;
17
+ }[];
18
+ };
19
+ };
20
+ setZoom(options?: any): void;
21
+ updateHierarchyLevel(depth: number): void;
22
+ getHierarchyLevel(): any;
23
+ hasParentNode(): boolean;
24
+ setDataGroups(): void;
25
+ protected setChildrenDataGroup(node: any, name: any): any;
26
+ }
@@ -0,0 +1,137 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ extendStatics(d, b);
10
+ function __() { this.constructor = d; }
11
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
+ };
13
+ })();
14
+ var __assign = (this && this.__assign) || function () {
15
+ __assign = Object.assign || function(t) {
16
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
17
+ s = arguments[i];
18
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
19
+ t[p] = s[p];
20
+ }
21
+ return t;
22
+ };
23
+ return __assign.apply(this, arguments);
24
+ };
25
+ // Internal Imports
26
+ import { ChartModel } from './model';
27
+ import { Tools } from './tools';
28
+ import { LegendItemType } from './interfaces/enums';
29
+ /** The charting model layer which includes mainly the chart data and options,
30
+ * as well as some misc. information to be shared among components */
31
+ var CirclePackChartModel = /** @class */ (function (_super) {
32
+ __extends(CirclePackChartModel, _super);
33
+ function CirclePackChartModel(services) {
34
+ var _this = _super.call(this, services) || this;
35
+ _this.parentNode = false;
36
+ _this.set({ depth: 2 }, { skipUpdate: true });
37
+ return _this;
38
+ }
39
+ CirclePackChartModel.prototype.setData = function (newData) {
40
+ _super.prototype.setData.call(this, newData);
41
+ this.setDataGroups();
42
+ if (newData.length === 1) {
43
+ this.parentNode = true;
44
+ }
45
+ this.setZoom();
46
+ };
47
+ CirclePackChartModel.prototype.setOptions = function (newOptions) {
48
+ var options = this.getOptions();
49
+ var zoomOptions = Tools.merge({}, newOptions, this.getZoomOptions(newOptions));
50
+ Tools.updateLegendAdditionalItems(options, zoomOptions);
51
+ var depth = this.getHierarchyLevel();
52
+ var userProvidedDepth = Tools.getProperty(options, 'circlePack', 'hierarchyLevel');
53
+ this.set({
54
+ options: Tools.merge(options, zoomOptions),
55
+ depth: userProvidedDepth && userProvidedDepth < 4
56
+ ? userProvidedDepth
57
+ : depth,
58
+ });
59
+ };
60
+ CirclePackChartModel.prototype.getZoomOptions = function (options) {
61
+ if (!this.getDisplayData()) {
62
+ return {};
63
+ }
64
+ // uses the user provided options and data to determine if there is zoom in this CP chart
65
+ var displayData = this.getDisplayData();
66
+ var zoomOptions = options ? options : this.getOptions();
67
+ var data = displayData.length === 1
68
+ ? Tools.getProperty(displayData, 0, 'children')
69
+ : displayData;
70
+ var depth = this.getHierarchyLevel();
71
+ // check the data depth
72
+ data.some(function (datum) {
73
+ if (datum.children) {
74
+ if (datum.children.some(function (item) { return item.children; })) {
75
+ depth = 3;
76
+ return false;
77
+ }
78
+ }
79
+ });
80
+ if (Tools.getProperty(zoomOptions, 'canvasZoom', 'enabled') === true &&
81
+ depth > 2) {
82
+ return {
83
+ legend: {
84
+ additionalItems: [
85
+ {
86
+ type: LegendItemType.ZOOM,
87
+ name: 'Click to zoom',
88
+ },
89
+ ],
90
+ },
91
+ };
92
+ }
93
+ return null;
94
+ };
95
+ CirclePackChartModel.prototype.setZoom = function (options) {
96
+ this.setOptions(this.getZoomOptions(options));
97
+ };
98
+ // update the hierarchy level
99
+ CirclePackChartModel.prototype.updateHierarchyLevel = function (depth) {
100
+ this.set({ depth: depth });
101
+ };
102
+ CirclePackChartModel.prototype.getHierarchyLevel = function () {
103
+ return this.get('depth');
104
+ };
105
+ CirclePackChartModel.prototype.hasParentNode = function () {
106
+ return this.parentNode;
107
+ };
108
+ // set the datagroup name on the items that are it's children
109
+ CirclePackChartModel.prototype.setDataGroups = function () {
110
+ var _this = this;
111
+ var data = this.getData();
112
+ var options = this.getOptions();
113
+ var groupMapsTo = options.data.groupMapsTo;
114
+ var newData = data.map(function (depthOne) {
115
+ var groupName = depthOne[groupMapsTo];
116
+ return _this.setChildrenDataGroup(depthOne, groupName);
117
+ });
118
+ this.set({
119
+ data: newData,
120
+ }, { skipUpdate: true });
121
+ };
122
+ // sets name recursively down the node tree
123
+ CirclePackChartModel.prototype.setChildrenDataGroup = function (node, name) {
124
+ var _this = this;
125
+ if (node.children) {
126
+ return __assign(__assign({}, node), { dataGroupName: name, children: node.children.map(function (child, i) {
127
+ return _this.setChildrenDataGroup(child, name);
128
+ }) });
129
+ }
130
+ else {
131
+ return __assign(__assign({}, node), { dataGroupName: name });
132
+ }
133
+ };
134
+ return CirclePackChartModel;
135
+ }(ChartModel));
136
+ export { CirclePackChartModel };
137
+ //# sourceMappingURL=../src/model-circle-pack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model-circle-pack.js","sourceRoot":"","sources":["model-circle-pack.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAU,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAG5D;qEACqE;AACrE;IAA0C,wCAAU;IAGnD,8BAAY,QAAa;QAAzB,YACC,kBAAM,QAAQ,CAAC,SAEf;QALD,gBAAU,GAAG,KAAK,CAAC;QAIlB,KAAI,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;;IAC9C,CAA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AM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAC5B,IAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAC1B,IAAA,sCAAW,CAAkB;QAErC,IAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,UAAC,QAAQ;YACjC,IAAM,SAAS,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;YACxC,OAAO,KAAI,CAAC,oBAAoB,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;QACvD,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,GAAG,CACP;YACC,IAAI,EAAE,OAAO;SACb,EACD,EAAE,UAAU,EAAE,IAAI,EAAE,CACpB,CAAC;IACH,CAAC;IAED,2CAA2C;IACjC,mDAAoB,GAA9B,UAA+B,IAAI,EAAE,IAAI;QAAzC,iBAYC;QAXA,IAAI,IAAI,CAAC,QAAQ,EAAE;YAClB,6BACI,IAAI,KACP,aAAa,EAAE,IAAI,EACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAC,KAAK,EAAE,CAAC;oBACpC,OAAO,KAAI,CAAC,oBAAoB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;gBAC/C,CAAC,CAAC,IACD;SACF;aAAM;YACN,6BAAY,IAAI,KAAE,aAAa,EAAE,IAAI,IAAG;SACxC;IACF,CAAC;IACF,2BAAC;AAAD,CAAC,AArID,CAA0C,UAAU,GAqInD","sourcesContent":["// Internal Imports\nimport { ChartModel } from './model';\nimport { Tools } from './tools';\nimport { Events, LegendItemType } from './interfaces/enums';\nimport { thresholdSturges } from 'd3-array';\n\n/** The charting model layer which includes mainly the chart data and options,\n * as well as some misc. information to be shared among components */\nexport class CirclePackChartModel extends ChartModel {\n\tparentNode = false;\n\n\tconstructor(services: any) {\n\t\tsuper(services);\n\t\tthis.set({ depth: 2 }, { skipUpdate: true });\n\t}\n\n\tsetData(newData) {\n\t\tsuper.setData(newData);\n\t\tthis.setDataGroups();\n\t\tif (newData.length === 1) {\n\t\t\tthis.parentNode = true;\n\t\t}\n\t\tthis.setZoom();\n\t}\n\n\tsetOptions(newOptions) {\n\t\tconst options = this.getOptions();\n\t\tconst zoomOptions = Tools.merge(\n\t\t\t{},\n\t\t\tnewOptions,\n\t\t\tthis.getZoomOptions(newOptions)\n\t\t);\n\t\tTools.updateLegendAdditionalItems(options, zoomOptions);\n\n\t\tlet depth = this.getHierarchyLevel();\n\t\tlet userProvidedDepth = Tools.getProperty(\n\t\t\toptions,\n\t\t\t'circlePack',\n\t\t\t'hierarchyLevel'\n\t\t);\n\n\t\tthis.set({\n\t\t\toptions: Tools.merge(options, zoomOptions),\n\t\t\tdepth:\n\t\t\t\tuserProvidedDepth && userProvidedDepth < 4\n\t\t\t\t\t? userProvidedDepth\n\t\t\t\t\t: depth,\n\t\t});\n\t}\n\n\tgetZoomOptions(options?) {\n\t\tif (!this.getDisplayData()) {\n\t\t\treturn {};\n\t\t}\n\t\t// uses the user provided options and data to determine if there is zoom in this CP chart\n\t\tconst displayData = this.getDisplayData();\n\t\tconst zoomOptions = options ? options : this.getOptions();\n\t\tconst data =\n\t\t\tdisplayData.length === 1\n\t\t\t\t? Tools.getProperty(displayData, 0, 'children')\n\t\t\t\t: displayData;\n\n\t\tlet depth = this.getHierarchyLevel();\n\t\t// check the data depth\n\t\tdata.some((datum) => {\n\t\t\tif (datum.children) {\n\t\t\t\tif (datum.children.some((item) => item.children)) {\n\t\t\t\t\tdepth = 3;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif (\n\t\t\tTools.getProperty(zoomOptions, 'canvasZoom', 'enabled') === true &&\n\t\t\tdepth > 2\n\t\t) {\n\t\t\treturn {\n\t\t\t\tlegend: {\n\t\t\t\t\tadditionalItems: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: LegendItemType.ZOOM,\n\t\t\t\t\t\t\tname: 'Click to zoom',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\treturn null;\n\t}\n\n\tsetZoom(options?) {\n\t\tthis.setOptions(this.getZoomOptions(options));\n\t}\n\n\t// update the hierarchy level\n\tupdateHierarchyLevel(depth: number) {\n\t\tthis.set({ depth: depth });\n\t}\n\n\tgetHierarchyLevel() {\n\t\treturn this.get('depth');\n\t}\n\n\thasParentNode() {\n\t\treturn this.parentNode;\n\t}\n\n\t// set the datagroup name on the items that are it's children\n\tsetDataGroups() {\n\t\tconst data = this.getData();\n\t\tconst options = this.getOptions();\n\t\tconst { groupMapsTo } = options.data;\n\n\t\tconst newData = data.map((depthOne) => {\n\t\t\tconst groupName = depthOne[groupMapsTo];\n\t\t\treturn this.setChildrenDataGroup(depthOne, groupName);\n\t\t});\n\n\t\tthis.set(\n\t\t\t{\n\t\t\t\tdata: newData,\n\t\t\t},\n\t\t\t{ skipUpdate: true }\n\t\t);\n\t}\n\n\t// sets name recursively down the node tree\n\tprotected setChildrenDataGroup(node, name) {\n\t\tif (node.children) {\n\t\t\treturn {\n\t\t\t\t...node,\n\t\t\t\tdataGroupName: name,\n\t\t\t\tchildren: node.children.map((child, i) => {\n\t\t\t\t\treturn this.setChildrenDataGroup(child, name);\n\t\t\t\t}),\n\t\t\t};\n\t\t} else {\n\t\t\treturn { ...node, dataGroupName: name };\n\t\t}\n\t}\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbon/charts",
3
- "version": "0.41.60",
3
+ "version": "0.41.64",
4
4
  "description": "Carbon charting components",
5
5
  "main": "./bundle.js",
6
6
  "module": "./index.js",
@@ -0,0 +1,11 @@
1
+ import { Service } from './service';
2
+ export declare class CanvasZoom extends Service {
3
+ protected model: any;
4
+ /**
5
+ * focal: object to zoom into
6
+ * canvasElements: all the elements to translate and zoom on the chart area
7
+ * zoomSettings: object containing duration, easing and zoomlevel for the zoom behaviours
8
+ * */
9
+ zoomIn(focal: any, canvasElements: any, zoomSettings?: any): void;
10
+ zoomOut(canvasElements: any, zoomSettings?: any): void;
11
+ }
@@ -0,0 +1,72 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ extendStatics(d, b);
10
+ function __() { this.constructor = d; }
11
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
+ };
13
+ })();
14
+ // Internal Imports
15
+ import { Service } from './service';
16
+ import { Events } from './../interfaces/enums';
17
+ import * as Configuration from '../configuration';
18
+ // Services
19
+ import { DOMUtils } from './index';
20
+ import { select } from 'd3-selection';
21
+ var CanvasZoom = /** @class */ (function (_super) {
22
+ __extends(CanvasZoom, _super);
23
+ function CanvasZoom() {
24
+ return _super !== null && _super.apply(this, arguments) || this;
25
+ }
26
+ /**
27
+ * focal: object to zoom into
28
+ * canvasElements: all the elements to translate and zoom on the chart area
29
+ * zoomSettings: object containing duration, easing and zoomlevel for the zoom behaviours
30
+ * */
31
+ CanvasZoom.prototype.zoomIn = function (focal, canvasElements, zoomSettings) {
32
+ var x;
33
+ var y;
34
+ var zoomLevel;
35
+ var settings = zoomSettings
36
+ ? zoomSettings
37
+ : Configuration.canvasZoomSettings;
38
+ if (focal) {
39
+ x = focal.x;
40
+ y = focal.y;
41
+ zoomLevel = 2;
42
+ }
43
+ // the 'viewport' size of the chart
44
+ var _a = DOMUtils.getSVGElementSize(this.services.domUtils.getHolder(), {
45
+ useClientDimensions: true,
46
+ }), width = _a.width, height = _a.height;
47
+ canvasElements
48
+ .transition()
49
+ .duration(settings.duration)
50
+ .ease(settings.ease)
51
+ .attr('transform', "translate(" + width / 2 + ", " + height / 2 + ") scale(" + zoomLevel + ") translate(" + -x + "," + -y + ")");
52
+ // Dispatch canvas zoom in event
53
+ this.services.events.dispatchEvent(Events.CanvasZoom.CANVAS_ZOOM_IN, {
54
+ element: select(focal),
55
+ });
56
+ };
57
+ CanvasZoom.prototype.zoomOut = function (canvasElements, zoomSettings) {
58
+ var settings = zoomSettings
59
+ ? zoomSettings
60
+ : Configuration.canvasZoomSettings;
61
+ canvasElements
62
+ .transition()
63
+ .duration(settings.duration)
64
+ .ease(settings.ease)
65
+ .attr('transform', '');
66
+ // Dispatch canvas zoom out event
67
+ this.services.events.dispatchEvent(Events.CanvasZoom.CANVAS_ZOOM_OUT);
68
+ };
69
+ return CanvasZoom;
70
+ }(Service));
71
+ export { CanvasZoom };
72
+ //# sourceMappingURL=../../src/services/canvas-zoom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canvas-zoom.js","sourceRoot":"","sources":["canvas-zoom.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,WAAW;AACX,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC;IAAgC,8BAAO;IAAvC;;IA4DA,CAAC;IAzDA;;;;UAIM;IACN,2BAAM,GAAN,UAAO,KAAK,EAAE,cAAc,EAAE,YAAa;QAC1C,IAAI,CAAC,CAAC;QACN,IAAI,CAAC,CAAC;QACN,IAAI,SAAS,CAAC;QACd,IAAM,QAAQ,GAAG,YAAY;YAC5B,CAAC,CAAC,YAAY;YACd,CAAC,CAAC,aAAa,CAAC,kBAAkB,CAAC;QAEpC,IAAI,KAAK,EAAE;YACV,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;YACZ,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;YACZ,SAAS,GAAG,CAAC,CAAC;SACd;QAED,mCAAmC;QAC7B,IAAA;;UAKL,EALO,gBAAK,EAAE,kBAKd,CAAC;QAEF,cAAc;aACZ,UAAU,EAAE;aACZ,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC;aAC3B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;aACnB,IAAI,CACJ,WAAW,EACX,eAAa,KAAK,GAAG,CAAC,UACrB,MAAM,GAAG,CAAC,gBACA,SAAS,oBAAe,CAAC,CAAC,SAAI,CAAC,CAAC,MAAG,CAC9C,CAAC;QAEH,gCAAgC;QAChC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,EAAE;YACpE,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC;SACtB,CAAC,CAAC;IACJ,CAAC;IAED,4BAAO,GAAP,UAAQ,cAAc,EAAE,YAAa;QACpC,IAAM,QAAQ,GAAG,YAAY;YAC5B,CAAC,CAAC,YAAY;YACd,CAAC,CAAC,aAAa,CAAC,kBAAkB,CAAC;QACpC,cAAc;aACZ,UAAU,EAAE;aACZ,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC;aAC3B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;aACnB,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QAExB,iCAAiC;QACjC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;IACvE,CAAC;IACF,iBAAC;AAAD,CAAC,AA5DD,CAAgC,OAAO,GA4DtC","sourcesContent":["// Internal Imports\nimport { Service } from './service';\nimport { Tools } from '../tools';\nimport { Events } from './../interfaces/enums';\nimport * as Configuration from '../configuration';\n// Services\nimport { DOMUtils } from './index';\nimport { select } from 'd3-selection';\n\nexport class CanvasZoom extends Service {\n\tprotected model: any;\n\n\t/**\n\t * focal: object to zoom into\n\t * canvasElements: all the elements to translate and zoom on the chart area\n\t * zoomSettings: object containing duration, easing and zoomlevel for the zoom behaviours\n\t * */\n\tzoomIn(focal, canvasElements, zoomSettings?) {\n\t\tlet x;\n\t\tlet y;\n\t\tlet zoomLevel;\n\t\tconst settings = zoomSettings\n\t\t\t? zoomSettings\n\t\t\t: Configuration.canvasZoomSettings;\n\n\t\tif (focal) {\n\t\t\tx = focal.x;\n\t\t\ty = focal.y;\n\t\t\tzoomLevel = 2;\n\t\t}\n\n\t\t// the 'viewport' size of the chart\n\t\tconst { width, height } = DOMUtils.getSVGElementSize(\n\t\t\tthis.services.domUtils.getHolder(),\n\t\t\t{\n\t\t\t\tuseClientDimensions: true,\n\t\t\t}\n\t\t);\n\n\t\tcanvasElements\n\t\t\t.transition()\n\t\t\t.duration(settings.duration)\n\t\t\t.ease(settings.ease)\n\t\t\t.attr(\n\t\t\t\t'transform',\n\t\t\t\t`translate(${width / 2}, ${\n\t\t\t\t\theight / 2\n\t\t\t\t}) scale(${zoomLevel}) translate(${-x},${-y})`\n\t\t\t);\n\n\t\t// Dispatch canvas zoom in event\n\t\tthis.services.events.dispatchEvent(Events.CanvasZoom.CANVAS_ZOOM_IN, {\n\t\t\telement: select(focal),\n\t\t});\n\t}\n\n\tzoomOut(canvasElements, zoomSettings?) {\n\t\tconst settings = zoomSettings\n\t\t\t? zoomSettings\n\t\t\t: Configuration.canvasZoomSettings;\n\t\tcanvasElements\n\t\t\t.transition()\n\t\t\t.duration(settings.duration)\n\t\t\t.ease(settings.ease)\n\t\t\t.attr('transform', '');\n\n\t\t// Dispatch canvas zoom out event\n\t\tthis.services.events.dispatchEvent(Events.CanvasZoom.CANVAS_ZOOM_OUT);\n\t}\n}\n"]}
@@ -5,3 +5,4 @@ export * from './essentials/gradient-utils';
5
5
  export * from './scales-cartesian';
6
6
  export * from './curves';
7
7
  export * from './zoom';
8
+ export * from './canvas-zoom';
package/services/index.js CHANGED
@@ -7,4 +7,5 @@ export * from './essentials/gradient-utils';
7
7
  export * from './scales-cartesian';
8
8
  export * from './curves';
9
9
  export * from './zoom';
10
+ export * from './canvas-zoom';
10
11
  //# sourceMappingURL=../../src/services/index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAE5C,OAAO;AACP,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC","sourcesContent":["// Essentials\nexport * from './essentials/dom-utils';\nexport * from './essentials/events';\nexport * from './essentials/transitions';\nexport * from './essentials/gradient-utils';\n\n// MISC\nexport * from './scales-cartesian';\nexport * from './curves';\nexport * from './zoom';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAE5C,OAAO;AACP,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC","sourcesContent":["// Essentials\nexport * from './essentials/dom-utils';\nexport * from './essentials/events';\nexport * from './essentials/transitions';\nexport * from './essentials/gradient-utils';\n\n// MISC\nexport * from './scales-cartesian';\nexport * from './curves';\nexport * from './zoom';\nexport * from './canvas-zoom';\n"]}
@@ -214,7 +214,7 @@ var CartesianScales = /** @class */ (function (_super) {
214
214
  var axesOptions = Tools.getProperty(options, 'axes');
215
215
  var axisOptions = axesOptions[axisPosition];
216
216
  var mapsTo = axisOptions.mapsTo;
217
- var value = datum[mapsTo] !== undefined ? datum[mapsTo] : datum;
217
+ var value = Tools.getProperty(datum, mapsTo) !== null ? datum[mapsTo] : datum;
218
218
  var scaledValue;
219
219
  switch (scaleType) {
220
220
  case ScaleTypes.LABELS:
@@ -364,7 +364,8 @@ var CartesianScales = /** @class */ (function (_super) {
364
364
  return [];
365
365
  }
366
366
  var displayData = this.model.getDisplayData();
367
- var mapsTo = axisOptions.mapsTo, percentage = axisOptions.percentage;
367
+ var extendLinearDomainBy = axisOptions.extendLinearDomainBy, mapsTo = axisOptions.mapsTo, percentage = axisOptions.percentage;
368
+ var _a = Configuration.axis.ratio, ratioReference = _a.reference, ratioCompareTo = _a.compareTo;
368
369
  // If domain is specified return that domain
369
370
  if (axisOptions.domain) {
370
371
  if (scaleType === ScaleTypes.LABELS) {
@@ -390,7 +391,10 @@ var CartesianScales = /** @class */ (function (_super) {
390
391
  var domain;
391
392
  var allDataValues;
392
393
  var dataGroupNames = this.model.getDataGroupNames();
393
- if (scaleType === ScaleTypes.TIME) {
394
+ if (scaleType === ScaleTypes.LABELS_RATIO) {
395
+ return displayData.map(function (datum) { return datum[ratioReference] + "/" + datum[ratioCompareTo]; });
396
+ }
397
+ else if (scaleType === ScaleTypes.TIME) {
394
398
  allDataValues = displayData.map(function (datum) { return +new Date(datum[mapsTo]); });
395
399
  }
396
400
  else if (bounds && options.axes) {
@@ -421,11 +425,14 @@ var CartesianScales = /** @class */ (function (_super) {
421
425
  allDataValues = [];
422
426
  displayData.forEach(function (datum) {
423
427
  var value = datum[mapsTo];
424
- if (value.length === 2) {
428
+ if (Array.isArray(value) && value.length === 2) {
425
429
  allDataValues.push(value[0]);
426
430
  allDataValues.push(value[1]);
427
431
  }
428
432
  else {
433
+ if (extendLinearDomainBy) {
434
+ allDataValues.push(Math.max(datum[mapsTo], datum[extendLinearDomainBy]));
435
+ }
429
436
  allDataValues.push(value);
430
437
  }
431
438
  });
@@ -452,7 +459,8 @@ var CartesianScales = /** @class */ (function (_super) {
452
459
  else if (scaleType === ScaleTypes.LOG) {
453
460
  scale = scaleLog().base(axisOptions.base || 10);
454
461
  }
455
- else if (scaleType === ScaleTypes.LABELS) {
462
+ else if (scaleType === ScaleTypes.LABELS ||
463
+ scaleType === ScaleTypes.LABELS_RATIO) {
456
464
  scale = scaleBand();
457
465
  }
458
466
  else {