@carbon/charts 0.41.100 → 0.42.1

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 (201) hide show
  1. package/CHANGELOG.md +57 -126
  2. package/axis-chart.d.ts +2 -2
  3. package/axis-chart.js +1 -1
  4. package/axis-chart.js.map +1 -1
  5. package/build/demo/data/CHART_TYPES.d.ts +5 -0
  6. package/build/demo/data/circle-pack.d.ts +2 -2
  7. package/build/demo/data/histogram.d.ts +63 -0
  8. package/build/demo/data/index.d.ts +1 -0
  9. package/build/src/axis-chart.d.ts +2 -2
  10. package/build/src/chart.d.ts +1 -1
  11. package/build/src/charts/boxplot.d.ts +1 -1
  12. package/build/src/charts/circle-pack.d.ts +1 -1
  13. package/build/src/charts/gauge.d.ts +1 -1
  14. package/build/src/charts/histogram.d.ts +8 -0
  15. package/build/src/charts/index.d.ts +1 -0
  16. package/build/src/charts/meter.d.ts +1 -1
  17. package/build/src/charts/pie.d.ts +1 -1
  18. package/build/src/components/axes/axis.d.ts +1 -1
  19. package/build/src/components/axes/chart-clip.d.ts +1 -1
  20. package/build/src/components/axes/ruler-binned.d.ts +7 -0
  21. package/build/src/components/axes/ruler.d.ts +2 -3
  22. package/build/src/components/axes/zoom-bar.d.ts +1 -1
  23. package/build/src/components/component.d.ts +1 -1
  24. package/build/src/components/essentials/modal.d.ts +1 -7
  25. package/build/src/components/essentials/threshold.d.ts +1 -1
  26. package/build/src/components/essentials/tooltip-histogram.d.ts +26 -0
  27. package/build/src/components/essentials/tooltip.d.ts +1 -1
  28. package/build/src/components/graphs/histogram.d.ts +12 -0
  29. package/build/src/components/index.d.ts +3 -0
  30. package/build/src/components/layout/layout.d.ts +1 -1
  31. package/build/src/configuration-non-customizable.d.ts +3 -0
  32. package/build/src/configuration.d.ts +2 -1
  33. package/build/src/interfaces/axis-scales.d.ts +53 -17
  34. package/build/src/interfaces/charts.d.ts +25 -2
  35. package/build/src/model/binned-charts.d.ts +7 -0
  36. package/build/src/{model-boxplot.d.ts → model/boxplot.d.ts} +1 -1
  37. package/build/src/{model-cartesian-charts.d.ts → model/cartesian-charts.d.ts} +2 -0
  38. package/build/src/{model-circle-pack.d.ts → model/circle-pack.d.ts} +1 -1
  39. package/build/src/{model-gauge.d.ts → model/gauge.d.ts} +0 -0
  40. package/build/src/{model-meter.d.ts → model/meter.d.ts} +0 -0
  41. package/build/src/{model.d.ts → model/model.d.ts} +15 -2
  42. package/build/src/{model-pie.d.ts → model/pie.d.ts} +0 -0
  43. package/build/src/services/service.d.ts +1 -1
  44. package/build/src/services/zoom.d.ts +1 -1
  45. package/build/src/tools.d.ts +1 -0
  46. package/bundle.js +1 -1
  47. package/chart.d.ts +1 -1
  48. package/chart.js +1 -1
  49. package/chart.js.map +1 -1
  50. package/charts/boxplot.d.ts +1 -1
  51. package/charts/boxplot.js +1 -1
  52. package/charts/boxplot.js.map +1 -1
  53. package/charts/circle-pack.d.ts +1 -1
  54. package/charts/circle-pack.js +1 -1
  55. package/charts/circle-pack.js.map +1 -1
  56. package/charts/gauge.d.ts +1 -1
  57. package/charts/gauge.js +1 -1
  58. package/charts/gauge.js.map +1 -1
  59. package/charts/histogram.d.ts +8 -0
  60. package/charts/histogram.js +48 -0
  61. package/charts/histogram.js.map +1 -0
  62. package/charts/index.d.ts +1 -0
  63. package/charts/index.js +1 -0
  64. package/charts/index.js.map +1 -1
  65. package/charts/meter.d.ts +1 -1
  66. package/charts/meter.js +1 -1
  67. package/charts/meter.js.map +1 -1
  68. package/charts/pie.d.ts +1 -1
  69. package/charts/pie.js +1 -1
  70. package/charts/pie.js.map +1 -1
  71. package/charts/wordcloud.js.map +1 -1
  72. package/components/axes/axis.d.ts +1 -1
  73. package/components/axes/axis.js.map +1 -1
  74. package/components/axes/chart-clip.d.ts +1 -1
  75. package/components/axes/chart-clip.js.map +1 -1
  76. package/components/axes/ruler-binned.d.ts +7 -0
  77. package/components/axes/ruler-binned.js +136 -0
  78. package/components/axes/ruler-binned.js.map +1 -0
  79. package/components/axes/ruler.d.ts +2 -3
  80. package/components/axes/ruler.js +4 -4
  81. package/components/axes/ruler.js.map +1 -1
  82. package/components/axes/zoom-bar.d.ts +1 -1
  83. package/components/axes/zoom-bar.js.map +1 -1
  84. package/components/component.d.ts +1 -1
  85. package/components/component.js.map +1 -1
  86. package/components/essentials/modal.d.ts +1 -7
  87. package/components/essentials/modal.js +8 -69
  88. package/components/essentials/modal.js.map +1 -1
  89. package/components/essentials/threshold.d.ts +1 -1
  90. package/components/essentials/threshold.js.map +1 -1
  91. package/components/essentials/tooltip-axis.js +2 -2
  92. package/components/essentials/tooltip-axis.js.map +1 -1
  93. package/components/essentials/tooltip-histogram.d.ts +26 -0
  94. package/components/essentials/tooltip-histogram.js +154 -0
  95. package/components/essentials/tooltip-histogram.js.map +1 -0
  96. package/components/essentials/tooltip.d.ts +1 -1
  97. package/components/essentials/tooltip.js.map +1 -1
  98. package/components/graphs/bar-grouped.js +4 -4
  99. package/components/graphs/bar-grouped.js.map +1 -1
  100. package/components/graphs/bar-stacked.js.map +1 -1
  101. package/components/graphs/circle-pack.js +6 -3
  102. package/components/graphs/circle-pack.js.map +1 -1
  103. package/components/graphs/histogram.d.ts +12 -0
  104. package/components/graphs/histogram.js +207 -0
  105. package/components/graphs/histogram.js.map +1 -0
  106. package/components/graphs/skeleton.js +3 -1
  107. package/components/graphs/skeleton.js.map +1 -1
  108. package/components/index.d.ts +3 -0
  109. package/components/index.js +3 -0
  110. package/components/index.js.map +1 -1
  111. package/components/layout/layout.d.ts +1 -1
  112. package/components/layout/layout.js.map +1 -1
  113. package/configuration-non-customizable.d.ts +3 -0
  114. package/configuration-non-customizable.js +3 -0
  115. package/configuration-non-customizable.js.map +1 -1
  116. package/configuration.d.ts +2 -1
  117. package/configuration.js +17 -4
  118. package/configuration.js.map +1 -1
  119. package/demo/data/CHART_TYPES.d.ts +5 -0
  120. package/demo/data/CHART_TYPES.js +5 -0
  121. package/demo/data/CHART_TYPES.js.map +1 -1
  122. package/demo/data/bundle.js +1 -1
  123. package/demo/data/circle-pack.d.ts +2 -2
  124. package/demo/data/circle-pack.js +2 -2
  125. package/demo/data/circle-pack.js.map +1 -1
  126. package/demo/data/histogram.d.ts +63 -0
  127. package/demo/data/histogram.js +312 -0
  128. package/demo/data/histogram.js.map +1 -0
  129. package/demo/data/index.d.ts +1 -0
  130. package/demo/data/index.js +22 -0
  131. package/demo/data/index.js.map +1 -1
  132. package/demo/styles.css +528 -4
  133. package/demo/styles.css.map +1 -1
  134. package/demo/styles.min.css +1 -1
  135. package/demo/styles.min.css.map +1 -1
  136. package/demo/tsconfig.tsbuildinfo +20 -6
  137. package/interfaces/axis-scales.d.ts +53 -17
  138. package/interfaces/axis-scales.js.map +1 -1
  139. package/interfaces/charts.d.ts +25 -2
  140. package/interfaces/charts.js.map +1 -1
  141. package/model/binned-charts.d.ts +7 -0
  142. package/model/binned-charts.js +52 -0
  143. package/model/binned-charts.js.map +1 -0
  144. package/{model-boxplot.d.ts → model/boxplot.d.ts} +1 -1
  145. package/{model-boxplot.js → model/boxplot.js} +4 -4
  146. package/model/boxplot.js.map +1 -0
  147. package/{model-cartesian-charts.d.ts → model/cartesian-charts.d.ts} +2 -0
  148. package/{model-cartesian-charts.js → model/cartesian-charts.js} +80 -20
  149. package/model/cartesian-charts.js.map +1 -0
  150. package/{model-circle-pack.d.ts → model/circle-pack.d.ts} +1 -1
  151. package/{model-circle-pack.js → model/circle-pack.js} +3 -3
  152. package/model/circle-pack.js.map +1 -0
  153. package/{model-gauge.d.ts → model/gauge.d.ts} +0 -0
  154. package/{model-gauge.js → model/gauge.js} +1 -1
  155. package/model/gauge.js.map +1 -0
  156. package/{model-meter.d.ts → model/meter.d.ts} +0 -0
  157. package/{model-meter.js → model/meter.js} +3 -3
  158. package/model/meter.js.map +1 -0
  159. package/{model.d.ts → model/model.d.ts} +15 -2
  160. package/{model.js → model/model.js} +120 -11
  161. package/model/model.js.map +1 -0
  162. package/{model-pie.d.ts → model/pie.d.ts} +0 -0
  163. package/{model-pie.js → model/pie.js} +1 -1
  164. package/model/pie.js.map +1 -0
  165. package/package.json +1 -1
  166. package/services/scales-cartesian.js +18 -4
  167. package/services/scales-cartesian.js.map +1 -1
  168. package/services/service.d.ts +1 -1
  169. package/services/service.js.map +1 -1
  170. package/services/zoom.d.ts +1 -1
  171. package/services/zoom.js.map +1 -1
  172. package/styles/colors.scss +2 -0
  173. package/styles/components/_ruler.scss +2 -1
  174. package/styles/styles.scss +4 -0
  175. package/styles-g10.css +132 -1
  176. package/styles-g10.css.map +1 -1
  177. package/styles-g10.min.css +1 -1
  178. package/styles-g10.min.css.map +1 -1
  179. package/styles-g100.css +132 -1
  180. package/styles-g100.css.map +1 -1
  181. package/styles-g100.min.css +1 -1
  182. package/styles-g100.min.css.map +1 -1
  183. package/styles-g90.css +132 -1
  184. package/styles-g90.css.map +1 -1
  185. package/styles-g90.min.css +1 -1
  186. package/styles-g90.min.css.map +1 -1
  187. package/styles.css +132 -1
  188. package/styles.css.map +1 -1
  189. package/styles.min.css +1 -1
  190. package/styles.min.css.map +1 -1
  191. package/tools.d.ts +1 -0
  192. package/tools.js +2 -1
  193. package/tools.js.map +1 -1
  194. package/tsconfig.tsbuildinfo +257 -146
  195. package/model-boxplot.js.map +0 -1
  196. package/model-cartesian-charts.js.map +0 -1
  197. package/model-circle-pack.js.map +0 -1
  198. package/model-gauge.js.map +0 -1
  199. package/model-meter.js.map +0 -1
  200. package/model-pie.js.map +0 -1
  201. package/model.js.map +0 -1
package/chart.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ChartConfig, BaseChartOptions, RenderTypes } from './interfaces';
2
- import { ChartModel } from './model';
2
+ import { ChartModel } from './model/model';
3
3
  import { Component, Modal, LayoutComponent, Tooltip } from './components';
4
4
  export declare class Chart {
5
5
  components: Component[];
package/chart.js CHANGED
@@ -8,7 +8,7 @@ var __spreadArrays = (this && this.__spreadArrays) || function () {
8
8
  // Internal Imports
9
9
  import { LayoutGrowth, LayoutDirection, LegendOrientations, Events as ChartEvents, RenderTypes, } from './interfaces';
10
10
  // Misc
11
- import { ChartModel } from './model';
11
+ import { ChartModel } from './model/model';
12
12
  import { Modal, Title, Legend, LayoutComponent, Tooltip, Spacer, CanvasChartClip, } from './components';
13
13
  import { Tools } from './tools';
14
14
  // Services
package/chart.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"chart.js","sourceRoot":"","sources":["chart.ts"],"names":[],"mappings":";;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAGN,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,MAAM,IAAI,WAAW,EACrB,WAAW,GACX,MAAM,cAAc,CAAC;AAEtB,OAAO;AACP,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAEN,KAAK,EACL,KAAK,EACL,MAAM,EACN,eAAe,EACf,OAAO,EACP,MAAM,EACN,eAAe,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,WAAW;AACX,OAAO,EACN,UAAU,EACV,QAAQ,EACR,MAAM,EACN,KAAK,EACL,aAAa,EACb,WAAW,GACX,MAAM,kBAAkB,CAAC;AAE1B;IAYC,eAAY,MAAe,EAAE,YAA2C;QAVxE,aAAQ,GAAQ;YACf,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,MAAM;YACd,aAAa,EAAE,aAAa;YAC5B,WAAW,EAAE,WAAW;YACxB,UAAU,EAAE,UAAU;SACtB,CAAC;QACF,UAAK,GAAe,IAAI,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAEyB,CAAC;IAE5E,iFAAiF;IACjF,oBAAI,GAAJ,UAAK,MAAe,EAAE,YAA2C;QAAjE,iBA8BC;QA7BA,gCAAgC;QAChC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,MAAM,QAAA,EAAE,EAAE,EAAE,UAA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Types,\n} from './interfaces';\n\n// Misc\nimport { ChartModel } from './model';\nimport {\n\tComponent,\n\tModal,\n\tTitle,\n\tLegend,\n\tLayoutComponent,\n\tTooltip,\n\tSpacer,\n\tCanvasChartClip,\n} from './components';\nimport { Tools } from './tools';\n\n// Services\nimport {\n\tCanvasZoom,\n\tDOMUtils,\n\tEvents,\n\tFiles,\n\tGradientUtils,\n\tTransitions,\n} from './services/index';\n\nexport class Chart {\n\tcomponents: Component[];\n\tservices: any = {\n\t\tdomUtils: DOMUtils,\n\t\tfiles: Files,\n\t\tevents: Events,\n\t\tgradientUtils: GradientUtils,\n\t\ttransitions: Transitions,\n\t\tcanvasZoom: CanvasZoom,\n\t};\n\tmodel: ChartModel = new ChartModel(this.services);\n\n\tconstructor(holder: Element, chartConfigs: ChartConfig<BaseChartOptions>) {}\n\n\t// Contains the code that uses properties that are overridable by the super-class\n\tinit(holder: Element, chartConfigs: ChartConfig<BaseChartOptions>) {\n\t\t// Store the holder in the model\n\t\tthis.model.set({ holder }, { skipUpdate: true });\n\n\t\t// Initialize all services\n\t\tObject.keys(this.services).forEach((serviceName) => {\n\t\t\tconst serviceObj = this.services[serviceName];\n\t\t\tthis.services[serviceName] = new serviceObj(\n\t\t\t\tthis.model,\n\t\t\t\tthis.services\n\t\t\t);\n\t\t});\n\n\t\t// Call update() when model has been updated\n\t\tthis.services.events.addEventListener(ChartEvents.Model.UPDATE, (e) => {\n\t\t\tconst animate = !!Tools.getProperty(e, 'detail', 'animate');\n\t\t\tthis.update(animate);\n\t\t});\n\n\t\t// Set model data & options\n\t\tthis.model.setData(chartConfigs.data);\n\n\t\t// Set chart resize event listener\n\t\tthis.services.events.addEventListener(ChartEvents.Chart.RESIZE, () => {\n\t\t\tthis.update(false);\n\t\t});\n\n\t\tthis.components = this.getComponents();\n\n\t\tthis.update();\n\t}\n\n\tgetComponents(): any[] {\n\t\tconsole.error('getComponents() method is not implemented');\n\n\t\treturn null;\n\t}\n\n\tupdate(animate = true) {\n\t\tif (!this.components) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Update all services\n\t\tObject.keys(this.services).forEach((serviceName) => {\n\t\t\tconst serviceObj = this.services[serviceName];\n\t\t\tserviceObj.update();\n\t\t});\n\n\t\t// Render all components\n\t\tthis.components.forEach((component) => component.render(animate));\n\n\t\t// Asynchronously dispatch a \"render-finished\" event\n\t\t// This is needed because of d3-transitions\n\t\t// Since at the start of the transition\n\t\t// Elements do not hold their final size or position\n\t\tconst pendingTransitions = this.services.transitions.getPendingTransitions();\n\t\tconst promises = Object.keys(pendingTransitions).map((transitionID) => {\n\t\t\tconst transition = pendingTransitions[transitionID];\n\t\t\treturn transition.end().catch((e) => e); // Skip rejects since we don't care about those;\n\t\t});\n\n\t\tPromise.all(promises).then(() =>\n\t\t\tthis.services.events.dispatchEvent(\n\t\t\t\tChartEvents.Chart.RENDER_FINISHED\n\t\t\t)\n\t\t);\n\t}\n\n\tdestroy() {\n\t\t// Call the destroy() method on all components\n\t\tthis.components.forEach((component) => component.destroy());\n\n\t\t// Remove the chart holder\n\t\tthis.services.domUtils.getHolder().remove();\n\n\t\tthis.model.set({ destroyed: true }, { skipUpdate: true });\n\t}\n\n\tprotected getChartComponents(\n\t\tgraphFrameComponents: any[],\n\t\tgraphFrameRenderType = RenderTypes.SVG\n\t) {\n\t\tconst titleComponent = {\n\t\t\tid: 'title',\n\t\t\tcomponents: [new Title(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t};\n\n\t\tconst legendComponent = {\n\t\t\tid: 'legend',\n\t\t\tcomponents: [new Legend(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t};\n\n\t\t// if canvas zoom is enabled\n\t\tconst isZoomEnabled = Tools.getProperty(\n\t\t\tthis.model.getOptions(),\n\t\t\t'canvasZoom',\n\t\t\t'enabled'\n\t\t);\n\n\t\tif (isZoomEnabled && isZoomEnabled === true) {\n\t\t\tgraphFrameComponents.push(\n\t\t\t\tnew CanvasChartClip(this.model, this.services)\n\t\t\t);\n\t\t}\n\n\t\tconst graphFrameComponent = {\n\t\t\tid: 'graph-frame',\n\t\t\tcomponents: graphFrameComponents,\n\t\t\tgrowth: LayoutGrowth.STRETCH,\n\t\t\trenderType: graphFrameRenderType,\n\t\t};\n\n\t\tconst isLegendEnabled =\n\t\t\tthis.model.getOptions().legend.enabled !== false;\n\t\t// TODORF - REUSE BETWEEN AXISCHART & CHART\n\t\t// Decide the position of the legend in reference to the chart\n\t\tlet fullFrameComponentDirection = LayoutDirection.COLUMN;\n\t\tif (isLegendEnabled) {\n\t\t\tconst legendPosition = Tools.getProperty(\n\t\t\t\tthis.model.getOptions(),\n\t\t\t\t'legend',\n\t\t\t\t'position'\n\t\t\t);\n\t\t\tif (legendPosition === 'left') {\n\t\t\t\tfullFrameComponentDirection = LayoutDirection.ROW;\n\n\t\t\t\tif (!this.model.getOptions().legend.orientation) {\n\t\t\t\t\tthis.model.getOptions().legend.orientation =\n\t\t\t\t\t\tLegendOrientations.VERTICAL;\n\t\t\t\t}\n\t\t\t} else if (legendPosition === 'right') {\n\t\t\t\tfullFrameComponentDirection = LayoutDirection.ROW_REVERSE;\n\n\t\t\t\tif (!this.model.getOptions().legend.orientation) {\n\t\t\t\t\tthis.model.getOptions().legend.orientation =\n\t\t\t\t\t\tLegendOrientations.VERTICAL;\n\t\t\t\t}\n\t\t\t} else if (legendPosition === 'bottom') {\n\t\t\t\tfullFrameComponentDirection = LayoutDirection.COLUMN_REVERSE;\n\t\t\t}\n\t\t}\n\n\t\tconst legendSpacerComponent = {\n\t\t\tid: 'spacer',\n\t\t\tcomponents: [new Spacer(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t};\n\n\t\tconst fullFrameComponent = {\n\t\t\tid: 'full-frame',\n\t\t\tcomponents: [\n\t\t\t\tnew LayoutComponent(\n\t\t\t\t\tthis.model,\n\t\t\t\t\tthis.services,\n\t\t\t\t\t[\n\t\t\t\t\t\t...(isLegendEnabled ? [legendComponent] : []),\n\t\t\t\t\t\t...(isLegendEnabled ? [legendSpacerComponent] : []),\n\t\t\t\t\t\tgraphFrameComponent,\n\t\t\t\t\t],\n\t\t\t\t\t{\n\t\t\t\t\t\tdirection: fullFrameComponentDirection,\n\t\t\t\t\t}\n\t\t\t\t),\n\t\t\t],\n\t\t\tgrowth: LayoutGrowth.STRETCH,\n\t\t};\n\n\t\t// Add chart title if it exists\n\t\tconst topLevelLayoutComponents = [];\n\t\tif (this.model.getOptions().title) {\n\t\t\ttopLevelLayoutComponents.push(titleComponent);\n\n\t\t\tconst titleSpacerComponent = {\n\t\t\t\tid: 'spacer',\n\t\t\t\tcomponents: [new Spacer(this.model, this.services)],\n\t\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t\t};\n\n\t\t\ttopLevelLayoutComponents.push(titleSpacerComponent);\n\t\t}\n\t\ttopLevelLayoutComponents.push(fullFrameComponent);\n\n\t\treturn [\n\t\t\tnew Tooltip(this.model, this.services),\n\t\t\tnew Modal(this.model, this.services),\n\t\t\tnew LayoutComponent(\n\t\t\t\tthis.model,\n\t\t\t\tthis.services,\n\t\t\t\ttopLevelLayoutComponents,\n\t\t\t\t{\n\t\t\t\t\tdirection: LayoutDirection.COLUMN,\n\t\t\t\t}\n\t\t\t),\n\t\t];\n\t}\n}\n"]}
1
+ {"version":3,"file":"chart.js","sourceRoot":"","sources":["chart.ts"],"names":[],"mappings":";;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAGN,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,MAAM,IAAI,WAAW,EACrB,WAAW,GACX,MAAM,cAAc,CAAC;AAEtB,OAAO;AACP,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAEN,KAAK,EACL,KAAK,EACL,MAAM,EACN,eAAe,EACf,OAAO,EACP,MAAM,EACN,eAAe,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,EAAE,MAAM,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SAAS;aAC9B,CAAC;YAEF,wBAAwB,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;SACpD;QACD,wBAAwB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAElD,OAAO;YACN,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACtC,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACpC,IAAI,eAAe,CAClB,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,QAAQ,EACb,wBAAwB,EACxB;gBACC,SAAS,EAAE,eAAe,CAAC,MAAM;aACjC,CACD;SACD,CAAC;IACH,CAAC;IACF,YAAC;AAAD,CAAC,AArND,IAqNC","sourcesContent":["// Internal Imports\nimport {\n\tChartConfig,\n\tBaseChartOptions,\n\tLayoutGrowth,\n\tLayoutDirection,\n\tLegendOrientations,\n\tEvents as ChartEvents,\n\tRenderTypes,\n} from './interfaces';\n\n// Misc\nimport { ChartModel } from './model/model';\nimport {\n\tComponent,\n\tModal,\n\tTitle,\n\tLegend,\n\tLayoutComponent,\n\tTooltip,\n\tSpacer,\n\tCanvasChartClip,\n} from './components';\nimport { Tools } from './tools';\n\n// Services\nimport {\n\tCanvasZoom,\n\tDOMUtils,\n\tEvents,\n\tFiles,\n\tGradientUtils,\n\tTransitions,\n} from './services/index';\n\nexport class Chart {\n\tcomponents: Component[];\n\tservices: any = {\n\t\tdomUtils: DOMUtils,\n\t\tfiles: Files,\n\t\tevents: Events,\n\t\tgradientUtils: GradientUtils,\n\t\ttransitions: Transitions,\n\t\tcanvasZoom: CanvasZoom,\n\t};\n\tmodel: ChartModel = new ChartModel(this.services);\n\n\tconstructor(holder: Element, chartConfigs: ChartConfig<BaseChartOptions>) {}\n\n\t// Contains the code that uses properties that are overridable by the super-class\n\tinit(holder: Element, chartConfigs: ChartConfig<BaseChartOptions>) {\n\t\t// Store the holder in the model\n\t\tthis.model.set({ holder }, { skipUpdate: true });\n\n\t\t// Initialize all services\n\t\tObject.keys(this.services).forEach((serviceName) => {\n\t\t\tconst serviceObj = this.services[serviceName];\n\t\t\tthis.services[serviceName] = new serviceObj(\n\t\t\t\tthis.model,\n\t\t\t\tthis.services\n\t\t\t);\n\t\t});\n\n\t\t// Call update() when model has been updated\n\t\tthis.services.events.addEventListener(ChartEvents.Model.UPDATE, (e) => {\n\t\t\tconst animate = !!Tools.getProperty(e, 'detail', 'animate');\n\t\t\tthis.update(animate);\n\t\t});\n\n\t\t// Set model data & options\n\t\tthis.model.setData(chartConfigs.data);\n\n\t\t// Set chart resize event listener\n\t\tthis.services.events.addEventListener(ChartEvents.Chart.RESIZE, () => {\n\t\t\tthis.update(false);\n\t\t});\n\n\t\tthis.components = this.getComponents();\n\n\t\tthis.update();\n\t}\n\n\tgetComponents(): any[] {\n\t\tconsole.error('getComponents() method is not implemented');\n\n\t\treturn null;\n\t}\n\n\tupdate(animate = true) {\n\t\tif (!this.components) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Update all services\n\t\tObject.keys(this.services).forEach((serviceName) => {\n\t\t\tconst serviceObj = this.services[serviceName];\n\t\t\tserviceObj.update();\n\t\t});\n\n\t\t// Render all components\n\t\tthis.components.forEach((component) => component.render(animate));\n\n\t\t// Asynchronously dispatch a \"render-finished\" event\n\t\t// This is needed because of d3-transitions\n\t\t// Since at the start of the transition\n\t\t// Elements do not hold their final size or position\n\t\tconst pendingTransitions = this.services.transitions.getPendingTransitions();\n\t\tconst promises = Object.keys(pendingTransitions).map((transitionID) => {\n\t\t\tconst transition = pendingTransitions[transitionID];\n\t\t\treturn transition.end().catch((e) => e); // Skip rejects since we don't care about those;\n\t\t});\n\n\t\tPromise.all(promises).then(() =>\n\t\t\tthis.services.events.dispatchEvent(\n\t\t\t\tChartEvents.Chart.RENDER_FINISHED\n\t\t\t)\n\t\t);\n\t}\n\n\tdestroy() {\n\t\t// Call the destroy() method on all components\n\t\tthis.components.forEach((component) => component.destroy());\n\n\t\t// Remove the chart holder\n\t\tthis.services.domUtils.getHolder().remove();\n\n\t\tthis.model.set({ destroyed: true }, { skipUpdate: true });\n\t}\n\n\tprotected getChartComponents(\n\t\tgraphFrameComponents: any[],\n\t\tgraphFrameRenderType = RenderTypes.SVG\n\t) {\n\t\tconst titleComponent = {\n\t\t\tid: 'title',\n\t\t\tcomponents: [new Title(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t};\n\n\t\tconst legendComponent = {\n\t\t\tid: 'legend',\n\t\t\tcomponents: [new Legend(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t};\n\n\t\t// if canvas zoom is enabled\n\t\tconst isZoomEnabled = Tools.getProperty(\n\t\t\tthis.model.getOptions(),\n\t\t\t'canvasZoom',\n\t\t\t'enabled'\n\t\t);\n\n\t\tif (isZoomEnabled && isZoomEnabled === true) {\n\t\t\tgraphFrameComponents.push(\n\t\t\t\tnew CanvasChartClip(this.model, this.services)\n\t\t\t);\n\t\t}\n\n\t\tconst graphFrameComponent = {\n\t\t\tid: 'graph-frame',\n\t\t\tcomponents: graphFrameComponents,\n\t\t\tgrowth: LayoutGrowth.STRETCH,\n\t\t\trenderType: graphFrameRenderType,\n\t\t};\n\n\t\tconst isLegendEnabled =\n\t\t\tthis.model.getOptions().legend.enabled !== false;\n\t\t// TODORF - REUSE BETWEEN AXISCHART & CHART\n\t\t// Decide the position of the legend in reference to the chart\n\t\tlet fullFrameComponentDirection = LayoutDirection.COLUMN;\n\t\tif (isLegendEnabled) {\n\t\t\tconst legendPosition = Tools.getProperty(\n\t\t\t\tthis.model.getOptions(),\n\t\t\t\t'legend',\n\t\t\t\t'position'\n\t\t\t);\n\t\t\tif (legendPosition === 'left') {\n\t\t\t\tfullFrameComponentDirection = LayoutDirection.ROW;\n\n\t\t\t\tif (!this.model.getOptions().legend.orientation) {\n\t\t\t\t\tthis.model.getOptions().legend.orientation =\n\t\t\t\t\t\tLegendOrientations.VERTICAL;\n\t\t\t\t}\n\t\t\t} else if (legendPosition === 'right') {\n\t\t\t\tfullFrameComponentDirection = LayoutDirection.ROW_REVERSE;\n\n\t\t\t\tif (!this.model.getOptions().legend.orientation) {\n\t\t\t\t\tthis.model.getOptions().legend.orientation =\n\t\t\t\t\t\tLegendOrientations.VERTICAL;\n\t\t\t\t}\n\t\t\t} else if (legendPosition === 'bottom') {\n\t\t\t\tfullFrameComponentDirection = LayoutDirection.COLUMN_REVERSE;\n\t\t\t}\n\t\t}\n\n\t\tconst legendSpacerComponent = {\n\t\t\tid: 'spacer',\n\t\t\tcomponents: [new Spacer(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t};\n\n\t\tconst fullFrameComponent = {\n\t\t\tid: 'full-frame',\n\t\t\tcomponents: [\n\t\t\t\tnew LayoutComponent(\n\t\t\t\t\tthis.model,\n\t\t\t\t\tthis.services,\n\t\t\t\t\t[\n\t\t\t\t\t\t...(isLegendEnabled ? [legendComponent] : []),\n\t\t\t\t\t\t...(isLegendEnabled ? [legendSpacerComponent] : []),\n\t\t\t\t\t\tgraphFrameComponent,\n\t\t\t\t\t],\n\t\t\t\t\t{\n\t\t\t\t\t\tdirection: fullFrameComponentDirection,\n\t\t\t\t\t}\n\t\t\t\t),\n\t\t\t],\n\t\t\tgrowth: LayoutGrowth.STRETCH,\n\t\t};\n\n\t\t// Add chart title if it exists\n\t\tconst topLevelLayoutComponents = [];\n\t\tif (this.model.getOptions().title) {\n\t\t\ttopLevelLayoutComponents.push(titleComponent);\n\n\t\t\tconst titleSpacerComponent = {\n\t\t\t\tid: 'spacer',\n\t\t\t\tcomponents: [new Spacer(this.model, this.services)],\n\t\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t\t};\n\n\t\t\ttopLevelLayoutComponents.push(titleSpacerComponent);\n\t\t}\n\t\ttopLevelLayoutComponents.push(fullFrameComponent);\n\n\t\treturn [\n\t\t\tnew Tooltip(this.model, this.services),\n\t\t\tnew Modal(this.model, this.services),\n\t\t\tnew LayoutComponent(\n\t\t\t\tthis.model,\n\t\t\t\tthis.services,\n\t\t\t\ttopLevelLayoutComponents,\n\t\t\t\t{\n\t\t\t\t\tdirection: LayoutDirection.COLUMN,\n\t\t\t\t}\n\t\t\t),\n\t\t];\n\t}\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { BoxplotChartModel } from '../model-boxplot';
1
+ import { BoxplotChartModel } from '../model/boxplot';
2
2
  import { AxisChart } from '../axis-chart';
3
3
  import { BoxplotChartOptions, ChartConfig } from '../interfaces/index';
4
4
  export declare class BoxplotChart extends AxisChart {
package/charts/boxplot.js CHANGED
@@ -12,7 +12,7 @@ var __extends = (this && this.__extends) || (function () {
12
12
  };
13
13
  })();
14
14
  // Internal Imports
15
- import { BoxplotChartModel } from '../model-boxplot';
15
+ import { BoxplotChartModel } from '../model/boxplot';
16
16
  import { AxisChart } from '../axis-chart';
17
17
  import * as Configuration from '../configuration';
18
18
  import { Tools } from '../tools';
@@ -1 +1 @@
1
- {"version":3,"file":"boxplot.js","sourceRoot":"","sources":["boxplot.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,aAAa;AACb,OAAO,EACN,IAAI,EACJ,OAAO,EACP,kBAAkB,EAClB,QAAQ,EAIR,QAAQ,GACR,MAAM,qBAAqB,CAAC;AAE7B;IAAkC,gCAAS;IAG1C,sBACC,MAAe,EACf,YAA8C;QAF/C,YAIC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAa3B;QAnBD,WAAK,GAAG,IAAI,iBAAiB,CAAC,KAAI,CAAC,QAAQ,CAAC,CAAC;QAQ5C,2CAA2C;QAC3C,iCAAiC;QACjC,KAAI,CAAC,KAAK,CAAC,UAAU,CACpB,KAAK,CAAC,wBAAwB,CAC7B,aAAa,CAAC,OAAO,CAAC,YAAY,EAClC,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QAEF,6CAA6C;QAC7C,KAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;;IACjC,CAAC;IAED,oCAAa,GAAb;QACC,gDAAgD;QAChD,IAAM,oBAAoB,GAAU;YACnC,IAAI,kBAAkB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACjD,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACnC,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACtC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACvC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;gBACvC,QAAQ,EAAE,SAAS,CAAC,aAAa;aACjC,CAAC;SACF,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CACpD,oBAAoB,EACpB;YACC,MAAM,EAAE;gBACP,OAAO,EAAE,KAAK;aACd;SACD,CACD,CAAC;QACF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,mBAAC;AAAD,CAAC,AA5CD,CAAkC,SAAS,GA4C1C","sourcesContent":["// Internal Imports\nimport { BoxplotChartModel } from '../model-boxplot';\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport { BoxplotChartOptions, ChartConfig } from '../interfaces/index';\nimport { Tools } from '../tools';\nimport { Skeletons } from '../interfaces/enums';\n\n// Components\nimport {\n\tGrid,\n\tBoxplot,\n\tTwoDimensionalAxes,\n\tZeroLine,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nexport class BoxplotChart extends AxisChart {\n\tmodel = new BoxplotChartModel(this.services);\n\n\tconstructor(\n\t\tholder: Element,\n\t\tchartConfigs: ChartConfig<BoxplotChartOptions>\n\t) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(\n\t\t\tTools.mergeDefaultChartOptions(\n\t\t\t\tConfiguration.options.boxplotChart,\n\t\t\t\tchartConfigs.options\n\t\t\t)\n\t\t);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetComponents() {\n\t\t// Specify what to render inside the graph-frame\n\t\tconst graphFrameComponents: any[] = [\n\t\t\tnew TwoDimensionalAxes(this.model, this.services),\n\t\t\tnew Grid(this.model, this.services),\n\t\t\tnew Boxplot(this.model, this.services),\n\t\t\tnew ZeroLine(this.model, this.services),\n\t\t\tnew Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.VERT_OR_HORIZ,\n\t\t\t}),\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(\n\t\t\tgraphFrameComponents,\n\t\t\t{\n\t\t\t\tlegend: {\n\t\t\t\t\tenabled: false,\n\t\t\t\t},\n\t\t\t}\n\t\t);\n\t\treturn components;\n\t}\n}\n"]}
1
+ {"version":3,"file":"boxplot.js","sourceRoot":"","sources":["boxplot.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAq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C,AA5CD,CAAkC,SAAS,GA4C1C","sourcesContent":["// Internal Imports\nimport { BoxplotChartModel } from '../model/boxplot';\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport { BoxplotChartOptions, ChartConfig } from '../interfaces/index';\nimport { Tools } from '../tools';\nimport { Skeletons } from '../interfaces/enums';\n\n// Components\nimport {\n\tGrid,\n\tBoxplot,\n\tTwoDimensionalAxes,\n\tZeroLine,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nexport class BoxplotChart extends AxisChart {\n\tmodel = new BoxplotChartModel(this.services);\n\n\tconstructor(\n\t\tholder: Element,\n\t\tchartConfigs: ChartConfig<BoxplotChartOptions>\n\t) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(\n\t\t\tTools.mergeDefaultChartOptions(\n\t\t\t\tConfiguration.options.boxplotChart,\n\t\t\t\tchartConfigs.options\n\t\t\t)\n\t\t);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetComponents() {\n\t\t// Specify what to render inside the graph-frame\n\t\tconst graphFrameComponents: any[] = [\n\t\t\tnew TwoDimensionalAxes(this.model, this.services),\n\t\t\tnew Grid(this.model, this.services),\n\t\t\tnew Boxplot(this.model, this.services),\n\t\t\tnew ZeroLine(this.model, this.services),\n\t\t\tnew Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.VERT_OR_HORIZ,\n\t\t\t}),\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(\n\t\t\tgraphFrameComponents,\n\t\t\t{\n\t\t\t\tlegend: {\n\t\t\t\t\tenabled: false,\n\t\t\t\t},\n\t\t\t}\n\t\t);\n\t\treturn components;\n\t}\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import { Chart } from '../chart';
2
- import { CirclePackChartModel } from './../model-circle-pack';
2
+ import { CirclePackChartModel } from '../model/circle-pack';
3
3
  import { ChartConfig, CirclePackChartOptions } from '../interfaces/index';
4
4
  export declare class CirclePackChart extends Chart {
5
5
  model: CirclePackChartModel;
@@ -13,7 +13,7 @@ var __extends = (this && this.__extends) || (function () {
13
13
  })();
14
14
  // Internal Imports
15
15
  import { Chart } from '../chart';
16
- import { CirclePackChartModel } from './../model-circle-pack';
16
+ import { CirclePackChartModel } from '../model/circle-pack';
17
17
  import * as Configuration from '../configuration';
18
18
  import { Tools } from '../tools';
19
19
  // Components
@@ -1 +1 @@
1
- {"version":3,"file":"circle-pack.js","sourceRoot":"","sources":["circle-pack.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,aAAa;AACb,OAAO,EACN,UAAU,GAKV,MAAM,qBAAqB,CAAC;AAE7B;IAAqC,mCAAK;IAGzC,yBACC,MAAe,EACf,YAAiD;QAFlD,YAIC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAa3B;QAnBD,WAAK,GAAG,IAAI,oBAAoB,CAAC,KAAI,CAAC,QAAQ,CAAC,CAAC;QAQ/C,2CAA2C;QAC3C,iCAAiC;QACjC,KAAI,CAAC,KAAK,CAAC,UAAU,CACpB,KAAK,CAAC,wBAAwB,CAC7B,aAAa,CAAC,OAAO,CAAC,eAAe,EACrC,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QAEF,6CAA6C;QAC7C,KAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;;IACjC,CAAC;IAED,uCAAa,GAAb;QACC,gDAAgD;QAChD,IAAM,oBAAoB,GAAG;YAC5B,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;SACzC,CAAC;QAEF,wDAAwD;QACxD,IAAM,UAAU,GAAU,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;QACxE,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,sBAAC;AAAD,CAAC,AAhCD,CAAqC,KAAK,GAgCzC","sourcesContent":["// Internal Imports\nimport { Chart } from '../chart';\nimport { CirclePackChartModel } from './../model-circle-pack';\nimport { ChartConfig, CirclePackChartOptions } from '../interfaces/index';\nimport * as Configuration from '../configuration';\nimport { Tools } from '../tools';\n\n// Components\nimport {\n\tCirclePack,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tLegend,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nexport class CirclePackChart extends Chart {\n\tmodel = new CirclePackChartModel(this.services);\n\n\tconstructor(\n\t\tholder: Element,\n\t\tchartConfigs: ChartConfig<CirclePackChartOptions>\n\t) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(\n\t\t\tTools.mergeDefaultChartOptions(\n\t\t\t\tConfiguration.options.circlePackChart,\n\t\t\t\tchartConfigs.options\n\t\t\t)\n\t\t);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetComponents() {\n\t\t// Specify what to render inside the graph-frame\n\t\tconst graphFrameComponents = [\n\t\t\tnew CirclePack(this.model, this.services),\n\t\t];\n\n\t\t// get the base chart components and export with tooltip\n\t\tconst components: any[] = this.getChartComponents(graphFrameComponents);\n\t\treturn components;\n\t}\n}\n"]}
1
+ {"version":3,"file":"circle-pack.js","sourceRoot":"","sources":["circle-pack.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,aAAa;AACb,OAAO,EACN,UAAU,GAKV,MAAM,qBAAqB,CAAC;AAE7B;IAAqC,mCAAK;IAGzC,yBACC,MAAe,EACf,YAAiD;QAFlD,YAIC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAa3B;QAnBD,WAAK,GAAG,IAAI,oBAAoB,CAAC,KAAI,CAAC,QAAQ,CAAC,CAAC;QAQ/C,2CAA2C;QAC3C,iCAAiC;QACjC,KAAI,CAAC,KAAK,CAAC,UAAU,CACpB,KAAK,CAAC,wBAAwB,CAC7B,aAAa,CAAC,OAAO,CAAC,eAAe,EACrC,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QAEF,6CAA6C;QAC7C,KAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;;IACjC,CAAC;IAED,uCAAa,GAAb;QACC,gDAAgD;QAChD,IAAM,oBAAoB,GAAG;YAC5B,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;SACzC,CAAC;QAEF,wDAAwD;QACxD,IAAM,UAAU,GAAU,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;QACxE,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,sBAAC;AAAD,CAAC,AAhCD,CAAqC,KAAK,GAgCzC","sourcesContent":["// Internal Imports\nimport { Chart } from '../chart';\nimport { CirclePackChartModel } from '../model/circle-pack';\nimport { ChartConfig, CirclePackChartOptions } from '../interfaces/index';\nimport * as Configuration from '../configuration';\nimport { Tools } from '../tools';\n\n// Components\nimport {\n\tCirclePack,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tLegend,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nexport class CirclePackChart extends Chart {\n\tmodel = new CirclePackChartModel(this.services);\n\n\tconstructor(\n\t\tholder: Element,\n\t\tchartConfigs: ChartConfig<CirclePackChartOptions>\n\t) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(\n\t\t\tTools.mergeDefaultChartOptions(\n\t\t\t\tConfiguration.options.circlePackChart,\n\t\t\t\tchartConfigs.options\n\t\t\t)\n\t\t);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetComponents() {\n\t\t// Specify what to render inside the graph-frame\n\t\tconst graphFrameComponents = [\n\t\t\tnew CirclePack(this.model, this.services),\n\t\t];\n\n\t\t// get the base chart components and export with tooltip\n\t\tconst components: any[] = this.getChartComponents(graphFrameComponents);\n\t\treturn components;\n\t}\n}\n"]}
package/charts/gauge.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Chart } from '../chart';
2
2
  import { ChartConfig, GaugeChartOptions } from '../interfaces/index';
3
- import { GaugeChartModel } from './../model-gauge';
3
+ import { GaugeChartModel } from '../model/gauge';
4
4
  export declare class GaugeChart extends Chart {
5
5
  model: GaugeChartModel;
6
6
  constructor(holder: Element, chartConfigs: ChartConfig<GaugeChartOptions>);
package/charts/gauge.js CHANGED
@@ -15,7 +15,7 @@ var __extends = (this && this.__extends) || (function () {
15
15
  import { Chart } from '../chart';
16
16
  import * as Configuration from '../configuration';
17
17
  import { Tools } from '../tools';
18
- import { GaugeChartModel } from './../model-gauge';
18
+ import { GaugeChartModel } from '../model/gauge';
19
19
  // Components
20
20
  import { Gauge } from '../components/index';
21
21
  var GaugeChart = /** @class */ (function (_super) {
@@ -1 +1 @@
1
- {"version":3,"file":"gauge.js","sourceRoot":"","sources":["gauge.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,aAAa;AACb,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C;IAAgC,8BAAK;IAEpC,oBAAY,MAAe,EAAE,YAA4C;QAAzE,YACC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAa3B;QAfD,WAAK,GAAG,IAAI,eAAe,CAAC,KAAI,CAAC,QAAQ,CAAC,CAAC;QAI1C,2CAA2C;QAC3C,iCAAiC;QACjC,KAAI,CAAC,KAAK,CAAC,UAAU,CACpB,KAAK,CAAC,wBAAwB,CAC7B,aAAa,CAAC,OAAO,CAAC,UAAU,EAChC,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QAEF,6CAA6C;QAC7C,KAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;;IACjC,CAAC;IAED,kCAAa,GAAb;QACC,gDAAgD;QAChD,IAAM,oBAAoB,GAAG,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QAEpE,IAAM,UAAU,GAAU,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;QAExE,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,iBAAC;AAAD,CAAC,AA1BD,CAAgC,KAAK,GA0BpC","sourcesContent":["// Internal Imports\nimport { Chart } from '../chart';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, GaugeChartOptions } from '../interfaces/index';\nimport { Tools } from '../tools';\nimport { GaugeChartModel } from './../model-gauge';\n\n// Components\nimport { Gauge } from '../components/index';\n\nexport class GaugeChart extends Chart {\n\tmodel = new GaugeChartModel(this.services);\n\tconstructor(holder: Element, chartConfigs: ChartConfig<GaugeChartOptions>) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(\n\t\t\tTools.mergeDefaultChartOptions(\n\t\t\t\tConfiguration.options.gaugeChart,\n\t\t\t\tchartConfigs.options\n\t\t\t)\n\t\t);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetComponents() {\n\t\t// Specify what to render inside the graph-frame\n\t\tconst graphFrameComponents = [new Gauge(this.model, this.services)];\n\n\t\tconst components: any[] = this.getChartComponents(graphFrameComponents);\n\n\t\treturn components;\n\t}\n}\n"]}
1
+ {"version":3,"file":"gauge.js","sourceRoot":"","sources":["gauge.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,aAAa;AACb,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C;IAAgC,8BAAK;IAEpC,oBAAY,MAAe,EAAE,YAA4C;QAAzE,YACC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAa3B;QAfD,WAAK,GAAG,IAAI,eAAe,CAAC,KAAI,CAAC,QAAQ,CAAC,CAAC;QAI1C,2CAA2C;QAC3C,iCAAiC;QACjC,KAAI,CAAC,KAAK,CAAC,UAAU,CACpB,KAAK,CAAC,wBAAwB,CAC7B,aAAa,CAAC,OAAO,CAAC,UAAU,EAChC,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QAEF,6CAA6C;QAC7C,KAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;;IACjC,CAAC;IAED,kCAAa,GAAb;QACC,gDAAgD;QAChD,IAAM,oBAAoB,GAAG,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QAEpE,IAAM,UAAU,GAAU,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;QAExE,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,iBAAC;AAAD,CAAC,AA1BD,CAAgC,KAAK,GA0BpC","sourcesContent":["// Internal Imports\nimport { Chart } from '../chart';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, GaugeChartOptions } from '../interfaces/index';\nimport { Tools } from '../tools';\nimport { GaugeChartModel } from '../model/gauge';\n\n// Components\nimport { Gauge } from '../components/index';\n\nexport class GaugeChart extends Chart {\n\tmodel = new GaugeChartModel(this.services);\n\tconstructor(holder: Element, chartConfigs: ChartConfig<GaugeChartOptions>) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(\n\t\t\tTools.mergeDefaultChartOptions(\n\t\t\t\tConfiguration.options.gaugeChart,\n\t\t\t\tchartConfigs.options\n\t\t\t)\n\t\t);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetComponents() {\n\t\t// Specify what to render inside the graph-frame\n\t\tconst graphFrameComponents = [new Gauge(this.model, this.services)];\n\n\t\tconst components: any[] = this.getChartComponents(graphFrameComponents);\n\n\t\treturn components;\n\t}\n}\n"]}
@@ -0,0 +1,8 @@
1
+ import { ChartModelBinned } from '../model/binned-charts';
2
+ import { AxisChart } from '../axis-chart';
3
+ import { ChartConfig, HistogramChartOptions } from '../interfaces/index';
4
+ export declare class HistogramChart extends AxisChart {
5
+ model: ChartModelBinned;
6
+ constructor(holder: Element, chartConfigs: ChartConfig<HistogramChartOptions>);
7
+ getComponents(): any[];
8
+ }
@@ -0,0 +1,48 @@
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 { ChartModelBinned } from '../model/binned-charts';
16
+ import { AxisChart } from '../axis-chart';
17
+ import * as Configuration from '../configuration';
18
+ import { Tools } from '../tools';
19
+ // Components
20
+ import { Grid, Histogram, BinnedRuler, TwoDimensionalAxes, } from '../components/index';
21
+ var HistogramChart = /** @class */ (function (_super) {
22
+ __extends(HistogramChart, _super);
23
+ function HistogramChart(holder, chartConfigs) {
24
+ var _this = _super.call(this, holder, chartConfigs) || this;
25
+ _this.model = new ChartModelBinned(_this.services);
26
+ // Merge the default options for this chart
27
+ // With the user provided options
28
+ _this.model.setOptions(Tools.mergeDefaultChartOptions(Configuration.options.histogramChart, chartConfigs.options));
29
+ // Initialize data, services, components etc.
30
+ _this.init(holder, chartConfigs);
31
+ _this.update();
32
+ return _this;
33
+ }
34
+ HistogramChart.prototype.getComponents = function () {
35
+ // Specify what to render inside the graph-frame
36
+ var graphFrameComponents = [
37
+ new TwoDimensionalAxes(this.model, this.services),
38
+ new Grid(this.model, this.services),
39
+ new BinnedRuler(this.model, this.services),
40
+ new Histogram(this.model, this.services),
41
+ ];
42
+ var components = this.getAxisChartComponents(graphFrameComponents);
43
+ return components;
44
+ };
45
+ return HistogramChart;
46
+ }(AxisChart));
47
+ export { HistogramChart };
48
+ //# sourceMappingURL=../../src/charts/histogram.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"histogram.js","sourceRoot":"","sources":["histogram.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,a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art } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, HistogramChartOptions } from '../interfaces/index';\nimport { Tools } from '../tools';\n\n// Components\nimport {\n\tGrid,\n\tHistogram,\n\tBinnedRuler,\n\tTwoDimensionalAxes,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n\tTooltipHistogram,\n} from '../components/index';\n\nexport class HistogramChart extends AxisChart {\n\tmodel = new ChartModelBinned(this.services);\n\n\tconstructor(\n\t\tholder: Element,\n\t\tchartConfigs: ChartConfig<HistogramChartOptions>\n\t) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(\n\t\t\tTools.mergeDefaultChartOptions(\n\t\t\t\tConfiguration.options.histogramChart,\n\t\t\t\tchartConfigs.options\n\t\t\t)\n\t\t);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\n\t\tthis.update();\n\t}\n\n\tgetComponents() {\n\t\t// Specify what to render inside the graph-frame\n\t\tconst graphFrameComponents = [\n\t\t\tnew TwoDimensionalAxes(this.model, this.services),\n\t\t\tnew Grid(this.model, this.services),\n\t\t\tnew BinnedRuler(this.model, this.services),\n\t\t\tnew Histogram(this.model, this.services),\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(\n\t\t\tgraphFrameComponents\n\t\t);\n\n\t\treturn components;\n\t}\n}\n"]}
package/charts/index.d.ts CHANGED
@@ -6,6 +6,7 @@ export * from './bar-stacked';
6
6
  export * from './boxplot';
7
7
  export * from './bubble';
8
8
  export * from './bullet';
9
+ export * from './histogram';
9
10
  export * from './line';
10
11
  export * from './lollipop';
11
12
  export * from './scatter';
package/charts/index.js CHANGED
@@ -6,6 +6,7 @@ export * from './bar-stacked';
6
6
  export * from './boxplot';
7
7
  export * from './bubble';
8
8
  export * from './bullet';
9
+ export * from './histogram';
9
10
  export * from './line';
10
11
  export * from './lollipop';
11
12
  export * from './scatter';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC","sourcesContent":["export * from './area';\nexport * from './area-stacked';\nexport * from './bar-simple';\nexport * from './bar-grouped';\nexport * from './bar-stacked';\nexport * from './boxplot';\nexport * from './bubble';\nexport * from './bullet';\nexport * from './line';\nexport * from './lollipop';\nexport * from './scatter';\nexport * from './pie';\nexport * from './donut';\nexport * from './meter';\nexport * from './radar';\nexport * from './gauge';\nexport * from './combo';\nexport * from './treemap';\nexport * from './circle-pack';\nexport * from './wordcloud';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC","sourcesContent":["export * from './area';\nexport * from './area-stacked';\nexport * from './bar-simple';\nexport * from './bar-grouped';\nexport * from './bar-stacked';\nexport * from './boxplot';\nexport * from './bubble';\nexport * from './bullet';\nexport * from './histogram';\nexport * from './line';\nexport * from './lollipop';\nexport * from './scatter';\nexport * from './pie';\nexport * from './donut';\nexport * from './meter';\nexport * from './radar';\nexport * from './gauge';\nexport * from './combo';\nexport * from './treemap';\nexport * from './circle-pack';\nexport * from './wordcloud';\n"]}
package/charts/meter.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { MeterChartModel } from '../model-meter';
1
+ import { MeterChartModel } from '../model/meter';
2
2
  import { Chart } from '../chart';
3
3
  import { ChartConfig, MeterChartOptions } from '../interfaces/index';
4
4
  export declare class MeterChart extends Chart {
package/charts/meter.js CHANGED
@@ -12,7 +12,7 @@ var __extends = (this && this.__extends) || (function () {
12
12
  };
13
13
  })();
14
14
  // Internal Imports
15
- import { MeterChartModel } from '../model-meter';
15
+ import { MeterChartModel } from '../model/meter';
16
16
  import { Chart } from '../chart';
17
17
  import * as Configuration from '../configuration';
18
18
  import { LayoutGrowth, LayoutDirection, RenderTypes, } from '../interfaces/index';
@@ -1 +1 @@
1
- {"version":3,"file":"meter.js","sourceRoot":"","sources":["meter.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAGN,YAAY,EACZ,eAAe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;YAC5B,EAAE,EAAE,QAAQ;YACZ,UAAU,EAAE,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;YAChE,MAAM,EAAE,YAAY,CAAC,SAAS;SAC9B,CAAC;QAEF,mEAAmE;QACnE,IAAM,UAAU,GAAG;YAClB,IAAI,eAAe,CAClB,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,QAAQ,EACb,CAAC,cAAc,EAAE,oBAAoB,EAAE,KAAK,CAAC,EAC7C;gBACC,SAAS,EAAE,eAAe,CAAC,MAAM;aACjC,CACD;SACD,CAAC;QAEF,+CAA+C;QAC/C,IAAM,UAAU,GAAU,IAAI,CAAC,kBAAkB,CAChD,UAAU,EACV,WAAW,CAAC,IAAI,CAChB,CAAC;QAEF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,iBAAC;AAAD,CAAC,AA/DD,CAAgC,KAAK,GA+DpC","sourcesContent":["// Internal Imports\nimport { MeterChartModel } from '../model-meter';\nimport { Chart } from '../chart';\nimport * as Configuration from '../configuration';\nimport {\n\tChartConfig,\n\tMeterChartOptions,\n\tLayoutGrowth,\n\tLayoutDirection,\n\tRenderTypes,\n} from '../interfaces/index';\nimport { Tools } from '../tools';\nimport { Meter } from './../components/graphs/meter';\n\n// Components\nimport {\n\tPie,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n\tMeterTitle,\n\tSpacer,\n} from '../components/index';\n\nexport class MeterChart extends Chart {\n\tmodel = new MeterChartModel(this.services);\n\n\tconstructor(holder: Element, chartConfigs: ChartConfig<MeterChartOptions>) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(\n\t\t\tTools.merge(\n\t\t\t\tTools.clone(Configuration.options.meterChart),\n\t\t\t\tchartConfigs.options\n\t\t\t)\n\t\t);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetComponents() {\n\t\t// Specify what to render inside the graph only\n\t\tconst graph = {\n\t\t\tid: 'meter-graph',\n\t\t\tcomponents: [new Meter(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.STRETCH,\n\t\t\trenderType: RenderTypes.SVG,\n\t\t};\n\n\t\t// Meter has an unique dataset title within the graph\n\t\tconst titleComponent = {\n\t\t\tid: 'meter-title',\n\t\t\tcomponents: [new MeterTitle(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t\trenderType: RenderTypes.SVG,\n\t\t};\n\n\t\t// create the title spacer\n\t\tconst titleSpacerComponent = {\n\t\t\tid: 'spacer',\n\t\t\tcomponents: [new Spacer(this.model, this.services, { size: 8 })],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t};\n\n\t\t// the graph frame for meter includes the custom title (and spacer)\n\t\tconst graphFrame = [\n\t\t\tnew LayoutComponent(\n\t\t\t\tthis.model,\n\t\t\t\tthis.services,\n\t\t\t\t[titleComponent, titleSpacerComponent, graph],\n\t\t\t\t{\n\t\t\t\t\tdirection: LayoutDirection.COLUMN,\n\t\t\t\t}\n\t\t\t),\n\t\t];\n\n\t\t// add the meter title as a top level component\n\t\tconst components: any[] = this.getChartComponents(\n\t\t\tgraphFrame,\n\t\t\tRenderTypes.HTML\n\t\t);\n\n\t\treturn components;\n\t}\n}\n"]}
1
+ {"version":3,"file":"meter.js","sourceRoot":"","sources":["meter.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAGN,YAAY,EACZ,eAAe,EACf,WAAW,GACX,MAAM,qBAAqB,CAAC;AAC7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AE,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;YAChE,MAAM,EAAE,YAAY,CAAC,SAAS;SAC9B,CAAC;QAEF,mEAAmE;QACnE,IAAM,UAAU,GAAG;YAClB,IAAI,eAAe,CAClB,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,QAAQ,EACb,CAAC,cAAc,EAAE,oBAAoB,EAAE,KAAK,CAAC,EAC7C;gBACC,SAAS,EAAE,eAAe,CAAC,MAAM;aACjC,CACD;SACD,CAAC;QAEF,+CAA+C;QAC/C,IAAM,UAAU,GAAU,IAAI,CAAC,kBAAkB,CAChD,UAAU,EACV,WAAW,CAAC,IAAI,CAChB,CAAC;QAEF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,iBAAC;AAAD,CAAC,AA/DD,CAAgC,KAAK,GA+DpC","sourcesContent":["// Internal Imports\nimport { MeterChartModel } from '../model/meter';\nimport { Chart } from '../chart';\nimport * as Configuration from '../configuration';\nimport {\n\tChartConfig,\n\tMeterChartOptions,\n\tLayoutGrowth,\n\tLayoutDirection,\n\tRenderTypes,\n} from '../interfaces/index';\nimport { Tools } from '../tools';\nimport { Meter } from './../components/graphs/meter';\n\n// Components\nimport {\n\tPie,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n\tMeterTitle,\n\tSpacer,\n} from '../components/index';\n\nexport class MeterChart extends Chart {\n\tmodel = new MeterChartModel(this.services);\n\n\tconstructor(holder: Element, chartConfigs: ChartConfig<MeterChartOptions>) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(\n\t\t\tTools.merge(\n\t\t\t\tTools.clone(Configuration.options.meterChart),\n\t\t\t\tchartConfigs.options\n\t\t\t)\n\t\t);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetComponents() {\n\t\t// Specify what to render inside the graph only\n\t\tconst graph = {\n\t\t\tid: 'meter-graph',\n\t\t\tcomponents: [new Meter(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.STRETCH,\n\t\t\trenderType: RenderTypes.SVG,\n\t\t};\n\n\t\t// Meter has an unique dataset title within the graph\n\t\tconst titleComponent = {\n\t\t\tid: 'meter-title',\n\t\t\tcomponents: [new MeterTitle(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t\trenderType: RenderTypes.SVG,\n\t\t};\n\n\t\t// create the title spacer\n\t\tconst titleSpacerComponent = {\n\t\t\tid: 'spacer',\n\t\t\tcomponents: [new Spacer(this.model, this.services, { size: 8 })],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t};\n\n\t\t// the graph frame for meter includes the custom title (and spacer)\n\t\tconst graphFrame = [\n\t\t\tnew LayoutComponent(\n\t\t\t\tthis.model,\n\t\t\t\tthis.services,\n\t\t\t\t[titleComponent, titleSpacerComponent, graph],\n\t\t\t\t{\n\t\t\t\t\tdirection: LayoutDirection.COLUMN,\n\t\t\t\t}\n\t\t\t),\n\t\t];\n\n\t\t// add the meter title as a top level component\n\t\tconst components: any[] = this.getChartComponents(\n\t\t\tgraphFrame,\n\t\t\tRenderTypes.HTML\n\t\t);\n\n\t\treturn components;\n\t}\n}\n"]}
package/charts/pie.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { PieChartModel } from '../model-pie';
1
+ import { PieChartModel } from '../model/pie';
2
2
  import { Chart } from '../chart';
3
3
  import { ChartConfig, PieChartOptions } from '../interfaces/index';
4
4
  export declare class PieChart extends Chart {
package/charts/pie.js CHANGED
@@ -12,7 +12,7 @@ var __extends = (this && this.__extends) || (function () {
12
12
  };
13
13
  })();
14
14
  // Internal Imports
15
- import { PieChartModel } from '../model-pie';
15
+ import { PieChartModel } from '../model/pie';
16
16
  import { Chart } from '../chart';
17
17
  import * as Configuration from '../configuration';
18
18
  import { Tools } from '../tools';
package/charts/pie.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"pie.js","sourceRoot":"","sources":["pie.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,aAAa;AACb,OAAO,EACN,GAAG,EAIH,QAAQ,GACR,MAAM,qBAAqB,CAAC;AAE7B;IAA8B,4BAAK;IAGlC,yCAAyC;IACzC,kBACC,MAAe,EACf,YAA0C,EAC1C,SAAiB;QAAjB,0BAAA,EAAA,iBAAiB;QAHlB,YAKC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAkB3B;QA1BD,WAAK,GAAG,IAAI,aAAa,CAAC,KAAI,CAAC,QAAQ,CAAC,CAAC;QAUxC,yCAAyC;QACzC,IAAI,SAAS,EAAE;;SAEd;QAED,2CAA2C;QAC3C,iCAAiC;QACjC,KAAI,CAAC,KAAK,CAAC,UAAU,CACpB,KAAK,CAAC,wBAAwB,CAC7B,aAAa,CAAC,OAAO,CAAC,QAAQ,EAC9B,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QAEF,6CAA6C;QAC7C,KAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;;IACjC,CAAC;IAED,gCAAa,GAAb;QACC,gDAAgD;QAChD,IAAM,oBAAoB,GAAU;YACnC,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YAClC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;gBACvC,QAAQ,EAAE,SAAS,CAAC,GAAG;aACvB,CAAC;SACF,CAAC;QAEF,wDAAwD;QACxD,IAAM,UAAU,GAAU,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;QACxE,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,eAAC;AAAD,CAAC,AA1CD,CAA8B,KAAK,GA0ClC","sourcesContent":["// Internal Imports\nimport { PieChartModel } from '../model-pie';\nimport { Chart } from '../chart';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, PieChartOptions } from '../interfaces/index';\nimport { Tools } from '../tools';\nimport { Skeletons } from '../interfaces/enums';\n\n// Components\nimport {\n\tPie,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tLegend,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nexport class PieChart extends Chart {\n\tmodel = new PieChartModel(this.services);\n\n\t// TODO - Optimize the use of \"extending\"\n\tconstructor(\n\t\tholder: Element,\n\t\tchartConfigs: ChartConfig<PieChartOptions>,\n\t\textending = false\n\t) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// TODO - Optimize the use of \"extending\"\n\t\tif (extending) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(\n\t\t\tTools.mergeDefaultChartOptions(\n\t\t\t\tConfiguration.options.pieChart,\n\t\t\t\tchartConfigs.options\n\t\t\t)\n\t\t);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetComponents() {\n\t\t// Specify what to render inside the graph-frame\n\t\tconst graphFrameComponents: any[] = [\n\t\t\tnew Pie(this.model, this.services),\n\t\t\tnew Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.PIE,\n\t\t\t}),\n\t\t];\n\n\t\t// get the base chart components and export with tooltip\n\t\tconst components: any[] = this.getChartComponents(graphFrameComponents);\n\t\treturn components;\n\t}\n}\n"]}
1
+ {"version":3,"file":"pie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AI,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;QACxE,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,eAAC;AAAD,CAAC,AA1CD,CAA8B,KAAK,GA0ClC","sourcesContent":["// Internal Imports\nimport { PieChartModel } from '../model/pie';\nimport { Chart } from '../chart';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, PieChartOptions } from '../interfaces/index';\nimport { Tools } from '../tools';\nimport { Skeletons } from '../interfaces/enums';\n\n// Components\nimport {\n\tPie,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tLegend,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nexport class PieChart extends Chart {\n\tmodel = new PieChartModel(this.services);\n\n\t// TODO - Optimize the use of \"extending\"\n\tconstructor(\n\t\tholder: Element,\n\t\tchartConfigs: ChartConfig<PieChartOptions>,\n\t\textending = false\n\t) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// TODO - Optimize the use of \"extending\"\n\t\tif (extending) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(\n\t\t\tTools.mergeDefaultChartOptions(\n\t\t\t\tConfiguration.options.pieChart,\n\t\t\t\tchartConfigs.options\n\t\t\t)\n\t\t);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetComponents() {\n\t\t// Specify what to render inside the graph-frame\n\t\tconst graphFrameComponents: any[] = [\n\t\t\tnew Pie(this.model, this.services),\n\t\t\tnew Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.PIE,\n\t\t\t}),\n\t\t];\n\n\t\t// get the base chart components and export with tooltip\n\t\tconst components: any[] = this.getChartComponents(graphFrameComponents);\n\t\treturn components;\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"wordcloud.js","sourceRoot":"","sources":["wordcloud.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,aAAa;AACb,OAAO,EACN,SAAS,EAIT,QAAQ,GACR,MAAM,qBAAqB,CAAC;AAE7B;IAAoC,kCAAK;IACxC,wBACC,MAAe,EACf,YAAiD;QAFlD,YAIC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAa3B;QAXA,2CAA2C;QAC3C,iCAAiC;QACjC,KAAI,CAAC,KAAK,CAAC,UAAU,CACpB,KAAK,CAAC,wBAAwB,CAC7B,aAAa,CAAC,OAAO,CAAC,cAAc,EACpC,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QAEF,6CAA6C;QAC7C,KAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;;IACjC,CAAC;IAED,sCAAa,GAAb;QACC,gDAAgD;QAChD,IAAM,oBAAoB,GAAU;YACnC,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACxC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;gBACvC,QAAQ,EAAE,SAAS,CAAC,GAAG;aACvB,CAAC;SACF,CAAC;QAEF,wDAAwD;QACxD,IAAM,UAAU,GAAU,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;QACxE,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,qBAAC;AAAD,CAAC,AAjCD,CAAoC,KAAK,GAiCxC","sourcesContent":["// Internal Imports\nimport { PieChartModel } from '../model-pie';\nimport { Chart } from '../chart';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, WorldCloudChartOptions } from '../interfaces/index';\nimport { Tools } from '../tools';\nimport { Skeletons } from '../interfaces/enums';\n\n// Components\nimport {\n\tWordCloud,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tLegend,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nexport class WordCloudChart extends Chart {\n\tconstructor(\n\t\tholder: Element,\n\t\tchartConfigs: ChartConfig<WorldCloudChartOptions>\n\t) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(\n\t\t\tTools.mergeDefaultChartOptions(\n\t\t\t\tConfiguration.options.wordCloudChart,\n\t\t\t\tchartConfigs.options\n\t\t\t)\n\t\t);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetComponents() {\n\t\t// Specify what to render inside the graph-frame\n\t\tconst graphFrameComponents: any[] = [\n\t\t\tnew WordCloud(this.model, this.services),\n\t\t\tnew Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.PIE,\n\t\t\t}),\n\t\t];\n\n\t\t// get the base chart components and export with tooltip\n\t\tconst components: any[] = this.getChartComponents(graphFrameComponents);\n\t\treturn components;\n\t}\n}\n"]}
1
+ {"version":3,"file":"wordcloud.js","sourceRoot":"","sources":["wordcloud.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,aAAa;AACb,OAAO,EACN,SAAS,EAIT,QAAQ,GACR,MAAM,qBAAqB,CAAC;AAE7B;IAAoC,kCAAK;IACxC,wBACC,MAAe,EACf,YAAiD;QAFlD,YAIC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAa3B;QAXA,2CAA2C;QAC3C,iCAAiC;QACjC,KAAI,CAAC,KAAK,CAAC,UAAU,CACpB,KAAK,CAAC,wBAAwB,CAC7B,aAAa,CAAC,OAAO,CAAC,cAAc,EACpC,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QAEF,6CAA6C;QAC7C,KAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;;IACjC,CAAC;IAED,sCAAa,GAAb;QACC,gDAAgD;QAChD,IAAM,oBAAoB,GAAU;YACnC,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACxC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;gBACvC,QAAQ,EAAE,SAAS,CAAC,GAAG;aACvB,CAAC;SACF,CAAC;QAEF,wDAAwD;QACxD,IAAM,UAAU,GAAU,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;QACxE,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,qBAAC;AAAD,CAAC,AAjCD,CAAoC,KAAK,GAiCxC","sourcesContent":["// Internal Imports\nimport { PieChartModel } from '../model/pie';\nimport { Chart } from '../chart';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, WorldCloudChartOptions } from '../interfaces/index';\nimport { Tools } from '../tools';\nimport { Skeletons } from '../interfaces/enums';\n\n// Components\nimport {\n\tWordCloud,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tLegend,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nexport class WordCloudChart extends Chart {\n\tconstructor(\n\t\tholder: Element,\n\t\tchartConfigs: ChartConfig<WorldCloudChartOptions>\n\t) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(\n\t\t\tTools.mergeDefaultChartOptions(\n\t\t\t\tConfiguration.options.wordCloudChart,\n\t\t\t\tchartConfigs.options\n\t\t\t)\n\t\t);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetComponents() {\n\t\t// Specify what to render inside the graph-frame\n\t\tconst graphFrameComponents: any[] = [\n\t\t\tnew WordCloud(this.model, this.services),\n\t\t\tnew Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.PIE,\n\t\t\t}),\n\t\t];\n\n\t\t// get the base chart components and export with tooltip\n\t\tconst components: any[] = this.getChartComponents(graphFrameComponents);\n\t\treturn components;\n\t}\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { Component } from '../component';
2
2
  import { ScaleTypes } from '../../interfaces';
3
- import { ChartModel } from '../../model';
3
+ import { ChartModel } from '../../model/model';
4
4
  import { RenderTypes } from '../../interfaces/enums';
5
5
  export declare class Axis extends Component {
6
6
  type: string;