@carbon/charts 1.6.13 → 1.7.0

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 (190) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/axis-chart.js +1 -1
  3. package/axis-chart.js.map +1 -1
  4. package/build/src/interfaces/charts.d.ts +6 -0
  5. package/build/src/tools.d.ts +2420 -151
  6. package/bundle.js +1 -1
  7. package/chart.js +1 -1
  8. package/chart.js.map +1 -1
  9. package/charts/alluvial.js +1 -1
  10. package/charts/alluvial.js.map +1 -1
  11. package/charts/area-stacked.js +1 -1
  12. package/charts/area-stacked.js.map +1 -1
  13. package/charts/area.js +1 -1
  14. package/charts/area.js.map +1 -1
  15. package/charts/bar-grouped.js +1 -1
  16. package/charts/bar-grouped.js.map +1 -1
  17. package/charts/bar-simple.js +1 -1
  18. package/charts/bar-simple.js.map +1 -1
  19. package/charts/bar-stacked.js +1 -1
  20. package/charts/bar-stacked.js.map +1 -1
  21. package/charts/boxplot.js +1 -1
  22. package/charts/boxplot.js.map +1 -1
  23. package/charts/bubble.js +1 -1
  24. package/charts/bubble.js.map +1 -1
  25. package/charts/bullet.js +1 -1
  26. package/charts/bullet.js.map +1 -1
  27. package/charts/circle-pack.js +1 -1
  28. package/charts/circle-pack.js.map +1 -1
  29. package/charts/combo.js +1 -1
  30. package/charts/combo.js.map +1 -1
  31. package/charts/donut.js +1 -1
  32. package/charts/donut.js.map +1 -1
  33. package/charts/gauge.js +1 -1
  34. package/charts/gauge.js.map +1 -1
  35. package/charts/heatmap.js +1 -1
  36. package/charts/heatmap.js.map +1 -1
  37. package/charts/histogram.js +1 -1
  38. package/charts/histogram.js.map +1 -1
  39. package/charts/line.js +1 -1
  40. package/charts/line.js.map +1 -1
  41. package/charts/lollipop.js +1 -1
  42. package/charts/lollipop.js.map +1 -1
  43. package/charts/meter.js +1 -1
  44. package/charts/meter.js.map +1 -1
  45. package/charts/pie.js +1 -1
  46. package/charts/pie.js.map +1 -1
  47. package/charts/radar.js +1 -1
  48. package/charts/radar.js.map +1 -1
  49. package/charts/scatter.js +1 -1
  50. package/charts/scatter.js.map +1 -1
  51. package/charts/tree.js +1 -1
  52. package/charts/tree.js.map +1 -1
  53. package/charts/treemap.js +1 -1
  54. package/charts/treemap.js.map +1 -1
  55. package/charts/wordcloud.js +1 -1
  56. package/charts/wordcloud.js.map +1 -1
  57. package/components/axes/axis.js +1 -1
  58. package/components/axes/axis.js.map +1 -1
  59. package/components/axes/grid.js +1 -1
  60. package/components/axes/grid.js.map +1 -1
  61. package/components/axes/hover-axis.js +1 -1
  62. package/components/axes/hover-axis.js.map +1 -1
  63. package/components/axes/ruler-binned.js +1 -1
  64. package/components/axes/ruler-binned.js.map +1 -1
  65. package/components/axes/ruler.js +1 -1
  66. package/components/axes/ruler.js.map +1 -1
  67. package/components/axes/toolbar.js +1 -1
  68. package/components/axes/toolbar.js.map +1 -1
  69. package/components/axes/two-dimensional-axes.js +1 -1
  70. package/components/axes/two-dimensional-axes.js.map +1 -1
  71. package/components/axes/zero-line.js +1 -1
  72. package/components/axes/zero-line.js.map +1 -1
  73. package/components/axes/zoom-bar.js +1 -1
  74. package/components/axes/zoom-bar.js.map +1 -1
  75. package/components/component.js +1 -1
  76. package/components/component.js.map +1 -1
  77. package/components/essentials/color-scale-legend.js +1 -1
  78. package/components/essentials/color-scale-legend.js.map +1 -1
  79. package/components/essentials/highlights.js +1 -1
  80. package/components/essentials/highlights.js.map +1 -1
  81. package/components/essentials/legend.js +1 -1
  82. package/components/essentials/legend.js.map +1 -1
  83. package/components/essentials/modal.js +1 -1
  84. package/components/essentials/modal.js.map +1 -1
  85. package/components/essentials/threshold.js +1 -1
  86. package/components/essentials/threshold.js.map +1 -1
  87. package/components/essentials/title-meter.js +1 -1
  88. package/components/essentials/title-meter.js.map +1 -1
  89. package/components/essentials/title.js +1 -1
  90. package/components/essentials/title.js.map +1 -1
  91. package/components/essentials/tooltip-axis.js +1 -1
  92. package/components/essentials/tooltip-axis.js.map +1 -1
  93. package/components/essentials/tooltip.js +1 -1
  94. package/components/essentials/tooltip.js.map +1 -1
  95. package/components/graphs/alluvial.js +1 -1
  96. package/components/graphs/alluvial.js.map +1 -1
  97. package/components/graphs/area-stacked.js +1 -1
  98. package/components/graphs/area-stacked.js.map +1 -1
  99. package/components/graphs/area.js +1 -1
  100. package/components/graphs/area.js.map +1 -1
  101. package/components/graphs/bar-grouped.js +1 -1
  102. package/components/graphs/bar-grouped.js.map +1 -1
  103. package/components/graphs/bar-simple.js +1 -1
  104. package/components/graphs/bar-simple.js.map +1 -1
  105. package/components/graphs/bar-stacked.js +1 -1
  106. package/components/graphs/bar-stacked.js.map +1 -1
  107. package/components/graphs/bar.js +1 -1
  108. package/components/graphs/bar.js.map +1 -1
  109. package/components/graphs/boxplot.js +1 -1
  110. package/components/graphs/boxplot.js.map +1 -1
  111. package/components/graphs/bubble.js +1 -1
  112. package/components/graphs/bubble.js.map +1 -1
  113. package/components/graphs/bullet.js +1 -1
  114. package/components/graphs/bullet.js.map +1 -1
  115. package/components/graphs/circle-pack.js +1 -1
  116. package/components/graphs/circle-pack.js.map +1 -1
  117. package/components/graphs/donut.js +1 -1
  118. package/components/graphs/donut.js.map +1 -1
  119. package/components/graphs/gauge.js +1 -1
  120. package/components/graphs/gauge.js.map +1 -1
  121. package/components/graphs/heatmap.js +1 -1
  122. package/components/graphs/heatmap.js.map +1 -1
  123. package/components/graphs/histogram.js +1 -1
  124. package/components/graphs/histogram.js.map +1 -1
  125. package/components/graphs/line.js +1 -1
  126. package/components/graphs/line.js.map +1 -1
  127. package/components/graphs/lollipop.js +1 -1
  128. package/components/graphs/lollipop.js.map +1 -1
  129. package/components/graphs/meter.js +1 -1
  130. package/components/graphs/meter.js.map +1 -1
  131. package/components/graphs/pie.js +1 -1
  132. package/components/graphs/pie.js.map +1 -1
  133. package/components/graphs/radar.js +1 -1
  134. package/components/graphs/radar.js.map +1 -1
  135. package/components/graphs/scatter-stacked.js +1 -1
  136. package/components/graphs/scatter-stacked.js.map +1 -1
  137. package/components/graphs/scatter.js +1 -1
  138. package/components/graphs/scatter.js.map +1 -1
  139. package/components/graphs/skeleton-lines.js +1 -1
  140. package/components/graphs/skeleton-lines.js.map +1 -1
  141. package/components/graphs/skeleton.js +1 -1
  142. package/components/graphs/skeleton.js.map +1 -1
  143. package/components/graphs/tree.js +1 -1
  144. package/components/graphs/tree.js.map +1 -1
  145. package/components/graphs/treemap.js +1 -1
  146. package/components/graphs/treemap.js.map +1 -1
  147. package/components/graphs/wordcloud.js +1 -1
  148. package/components/graphs/wordcloud.js.map +1 -1
  149. package/components/layout/layout.js +1 -1
  150. package/components/layout/layout.js.map +1 -1
  151. package/configuration.js +1 -1
  152. package/configuration.js.map +1 -1
  153. package/demo/data/bar.js +60 -12
  154. package/demo/data/bar.js.map +1 -1
  155. package/demo/tsconfig.tsbuildinfo +1 -1
  156. package/interfaces/charts.d.ts +6 -0
  157. package/interfaces/charts.js.map +1 -1
  158. package/model/boxplot.js +1 -1
  159. package/model/boxplot.js.map +1 -1
  160. package/model/bullet.js +1 -1
  161. package/model/bullet.js.map +1 -1
  162. package/model/cartesian-charts.js +1 -1
  163. package/model/cartesian-charts.js.map +1 -1
  164. package/model/circle-pack.js +1 -1
  165. package/model/circle-pack.js.map +1 -1
  166. package/model/heatmap.js +1 -1
  167. package/model/heatmap.js.map +1 -1
  168. package/model/meter.js +1 -1
  169. package/model/meter.js.map +1 -1
  170. package/model/model.js +8 -2
  171. package/model/model.js.map +1 -1
  172. package/model/radar.js +1 -1
  173. package/model/radar.js.map +1 -1
  174. package/model/treemap.js +1 -1
  175. package/model/treemap.js.map +1 -1
  176. package/package.json +1 -1
  177. package/services/essentials/dom-utils.js +15 -3
  178. package/services/essentials/dom-utils.js.map +1 -1
  179. package/services/essentials/transitions.js +1 -1
  180. package/services/essentials/transitions.js.map +1 -1
  181. package/services/scales-cartesian.js +1 -1
  182. package/services/scales-cartesian.js.map +1 -1
  183. package/services/time-series.js +1 -1
  184. package/services/time-series.js.map +1 -1
  185. package/services/zoom.js +1 -1
  186. package/services/zoom.js.map +1 -1
  187. package/tools.d.ts +141 -155
  188. package/tools.js +315 -344
  189. package/tools.js.map +1 -1
  190. package/tsconfig.tsbuildinfo +92 -92
package/chart.js CHANGED
@@ -10,7 +10,7 @@ import { LayoutGrowth, LayoutAlignItems, LayoutDirection, LegendOrientations, Ev
10
10
  // Misc
11
11
  import { ChartModel } from './model/model';
12
12
  import { Modal, Title, Legend, LayoutComponent, Toolbar, Tooltip, Spacer, CanvasChartClip, } from './components';
13
- import { Tools } from './tools';
13
+ import * as Tools from './tools';
14
14
  // Services
15
15
  import { CanvasZoom, DOMUtils, Events, Files, GradientUtils, Transitions, } from './services/index';
16
16
  var Chart = /** @class */ (function () {
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,gBAAgB,EAChB,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,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,aAA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,EAAE,2BAA2B;iBACtC,CACD;aACD;YACD,MAAM,EAAE,YAAY,CAAC,OAAO;SAC5B,CAAC;QAEF,+BAA+B;QAC/B,IAAM,wBAAwB,GAAG,EAAE,CAAC;QAEpC,IAAI,cAAc,IAAI,cAAc,EAAE;YACrC,wBAAwB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YAE/C,IAAM,oBAAoB,GAAG;gBAC5B,EAAE,EAAE,QAAQ;gBACZ,UAAU,EAAE;oBACX,IAAI,MAAM,CACT,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,QAAQ,EACb,cAAc,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CACzC;iBACD;gBACD,MAAM,EAAE,YAAY,CAAC,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,AA9PD,IA8PC","sourcesContent":["// Internal Imports\nimport {\n\tChartConfig,\n\tBaseChartOptions,\n\tLayoutGrowth,\n\tLayoutAlignItems,\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\tToolbar,\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\t\t// do nothing.\n\t}\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\tconfigs?: object\n\t) {\n\t\tconst options = this.model.getOptions();\n\n\t\tconst toolbarEnabled = Tools.getProperty(options, 'toolbar', 'enabled');\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\toptions,\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 titleAvailable = !!this.model.getOptions().title;\n\t\tconst titleComponent = {\n\t\t\tid: 'title',\n\t\t\tcomponents: [new Title(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.STRETCH,\n\t\t};\n\n\t\tconst toolbarComponent = {\n\t\t\tid: 'toolbar',\n\t\t\tcomponents: [new Toolbar(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t};\n\n\t\tconst headerComponent = {\n\t\t\tid: 'header',\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// always add title to keep layout correct\n\t\t\t\t\t\ttitleComponent,\n\t\t\t\t\t\t...(toolbarEnabled ? [toolbarComponent] : []),\n\t\t\t\t\t],\n\t\t\t\t\t{\n\t\t\t\t\t\tdirection: LayoutDirection.ROW,\n\t\t\t\t\t\talignItems: LayoutAlignItems.CENTER,\n\t\t\t\t\t}\n\t\t\t\t),\n\t\t\t],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\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:\n\t\t\t\tTools.getProperty(configs, 'graphFrameRenderType') ||\n\t\t\t\tRenderTypes.SVG,\n\t\t};\n\n\t\tconst isLegendEnabled =\n\t\t\tTools.getProperty(configs, 'excludeLegend') !== true &&\n\t\t\toptions.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\toptions,\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 (!options.legend.orientation) {\n\t\t\t\t\toptions.legend.orientation = LegendOrientations.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 (!options.legend.orientation) {\n\t\t\t\t\toptions.legend.orientation = LegendOrientations.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\n\t\tif (titleAvailable || toolbarEnabled) {\n\t\t\ttopLevelLayoutComponents.push(headerComponent);\n\n\t\t\tconst titleSpacerComponent = {\n\t\t\t\tid: 'spacer',\n\t\t\t\tcomponents: [\n\t\t\t\t\tnew Spacer(\n\t\t\t\t\t\tthis.model,\n\t\t\t\t\t\tthis.services,\n\t\t\t\t\t\ttoolbarEnabled ? { size: 15 } : undefined\n\t\t\t\t\t),\n\t\t\t\t],\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,gBAAgB,EAChB,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,OAAO,EACP,MAAM,EACN,eAAe,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,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;QAGjD,cAAc;IACf,CAAC;IAED,iFAAiF;IACjF,oBAAI,GAAJ,UAAK,MAAe,EAAE,YAA2C;QAAjE,iBA8BC;QA7BA,gCAAgC;QAChC,IA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AC5B,EAAE,EAAE,QAAQ;gBACZ,UAAU,EAAE;oBACX,IAAI,MAAM,CACT,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,QAAQ,EACb,cAAc,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CACzC;iBACD;gBACD,MAAM,EAAE,YAAY,CAAC,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,AA9PD,IA8PC","sourcesContent":["// Internal Imports\nimport {\n\tChartConfig,\n\tBaseChartOptions,\n\tLayoutGrowth,\n\tLayoutAlignItems,\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\tToolbar,\n\tTooltip,\n\tSpacer,\n\tCanvasChartClip,\n} from './components';\nimport * as 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\t\t// do nothing.\n\t}\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\tconfigs?: object\n\t) {\n\t\tconst options = this.model.getOptions();\n\n\t\tconst toolbarEnabled = Tools.getProperty(options, 'toolbar', 'enabled');\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\toptions,\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 titleAvailable = !!this.model.getOptions().title;\n\t\tconst titleComponent = {\n\t\t\tid: 'title',\n\t\t\tcomponents: [new Title(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.STRETCH,\n\t\t};\n\n\t\tconst toolbarComponent = {\n\t\t\tid: 'toolbar',\n\t\t\tcomponents: [new Toolbar(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t};\n\n\t\tconst headerComponent = {\n\t\t\tid: 'header',\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// always add title to keep layout correct\n\t\t\t\t\t\ttitleComponent,\n\t\t\t\t\t\t...(toolbarEnabled ? [toolbarComponent] : []),\n\t\t\t\t\t],\n\t\t\t\t\t{\n\t\t\t\t\t\tdirection: LayoutDirection.ROW,\n\t\t\t\t\t\talignItems: LayoutAlignItems.CENTER,\n\t\t\t\t\t}\n\t\t\t\t),\n\t\t\t],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\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:\n\t\t\t\tTools.getProperty(configs, 'graphFrameRenderType') ||\n\t\t\t\tRenderTypes.SVG,\n\t\t};\n\n\t\tconst isLegendEnabled =\n\t\t\tTools.getProperty(configs, 'excludeLegend') !== true &&\n\t\t\toptions.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\toptions,\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 (!options.legend.orientation) {\n\t\t\t\t\toptions.legend.orientation = LegendOrientations.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 (!options.legend.orientation) {\n\t\t\t\t\toptions.legend.orientation = LegendOrientations.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\n\t\tif (titleAvailable || toolbarEnabled) {\n\t\t\ttopLevelLayoutComponents.push(headerComponent);\n\n\t\t\tconst titleSpacerComponent = {\n\t\t\t\tid: 'spacer',\n\t\t\t\tcomponents: [\n\t\t\t\t\tnew Spacer(\n\t\t\t\t\t\tthis.model,\n\t\t\t\t\t\tthis.services,\n\t\t\t\t\t\ttoolbarEnabled ? { size: 15 } : undefined\n\t\t\t\t\t),\n\t\t\t\t],\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"]}
@@ -15,7 +15,7 @@ var __extends = (this && this.__extends) || (function () {
15
15
  import { Chart } from '../chart';
16
16
  import { AlluvialChartModel } from '../model/alluvial';
17
17
  import * as Configuration from '../configuration';
18
- import { Tools } from '../tools';
18
+ import * as Tools from '../tools';
19
19
  // Components
20
20
  import { Alluvial, } from '../components/index';
21
21
  var AlluvialChart = /** @class */ (function (_super) {
@@ -1 +1 @@
1
- {"version":3,"file":"alluvial.js","sourceRoot":"","sources":["alluvial.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,aAAa;AACb,OAAO,EACN,QAAQ,GAKR,MAAM,qBAAqB,CAAC;AAE7B;IAAmC,iCAAK;IAGvC,uBACC,MAAe,EACf,YAA+C;QAFhD,YAIC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAa3B;QAnBD,WAAK,GAAG,IAAI,kBAAkB,CAAC,KAAI,CAAC,QAAQ,CAAC,CAAC;QAQ7C,2CAA2C;QAC3C,iCAAiC;QACjC,KAAI,CAAC,KAAK,CAAC,UAAU,CACpB,KAAK,CAAC,wBAAwB,CAC7B,aAAa,CAAC,OAAO,CAAC,aAAa,EACnC,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QAEF,6CAA6C;QAC7C,KAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;;IACjC,CAAC;IAED,qCAAa,GAAb;QACC,gDAAgD;QAChD,IAAM,oBAAoB,GAAQ;YACjC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;SACvC,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,kBAAkB,CAChD,oBAAoB,EACpB;YACC,aAAa,EAAE,IAAI;SACnB,CACD,CAAC;QACF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,oBAAC;AAAD,CAAC,AApCD,CAAmC,KAAK,GAoCvC","sourcesContent":["// Internal Imports\nimport { Chart } from '../chart';\nimport { AlluvialChartModel } from '../model/alluvial';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, AlluvialChartOptions } from '../interfaces/index';\nimport { Tools } from '../tools';\n\n// Components\nimport {\n\tAlluvial,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n} from '../components/index';\n\nexport class AlluvialChart extends Chart {\n\tmodel = new AlluvialChartModel(this.services);\n\n\tconstructor(\n\t\tholder: Element,\n\t\tchartConfigs: ChartConfig<AlluvialChartOptions>\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.alluvialChart,\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 Alluvial(this.model, this.services),\n\t\t];\n\n\t\tconst components: any[] = this.getChartComponents(\n\t\t\tgraphFrameComponents,\n\t\t\t{\n\t\t\t\texcludeLegend: true,\n\t\t\t}\n\t\t);\n\t\treturn components;\n\t}\n}\n"]}
1
+ {"version":3,"file":"alluvial.js","sourceRoot":"","sources":["alluvial.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAElC,aAAa;AACb,OAAO,EACN,QAAQ,GAKR,MAAM,qBAAqB,CAAC;AAE7B;IAAmC,iCAAK;IAGvC,uBACC,MAAe,EACf,YAA+C;QAFhD,YAIC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAa3B;QAnBD,WAAK,GAAG,IAAI,kBAAkB,CAAC,KAAI,CAAC,QAAQ,CAAC,CAAC;QAQ7C,2CAA2C;QAC3C,iCAAiC;QACjC,KAAI,CAAC,KAAK,CAAC,UAAU,CACpB,KAAK,CAAC,wBAAwB,CAC7B,aAAa,CAAC,OAAO,CAAC,aAAa,EACnC,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QAEF,6CAA6C;QAC7C,KAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;;IACjC,CAAC;IAED,qCAAa,GAAb;QACC,gDAAgD;QAChD,IAAM,oBAAoB,GAAQ;YACjC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;SACvC,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,kBAAkB,CAChD,oBAAoB,EACpB;YACC,aAAa,EAAE,IAAI;SACnB,CACD,CAAC;QACF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,oBAAC;AAAD,CAAC,AApCD,CAAmC,KAAK,GAoCvC","sourcesContent":["// Internal Imports\nimport { Chart } from '../chart';\nimport { AlluvialChartModel } from '../model/alluvial';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, AlluvialChartOptions } from '../interfaces/index';\nimport * as Tools from '../tools';\n\n// Components\nimport {\n\tAlluvial,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n} from '../components/index';\n\nexport class AlluvialChart extends Chart {\n\tmodel = new AlluvialChartModel(this.services);\n\n\tconstructor(\n\t\tholder: Element,\n\t\tchartConfigs: ChartConfig<AlluvialChartOptions>\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.alluvialChart,\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 Alluvial(this.model, this.services),\n\t\t];\n\n\t\tconst components: any[] = this.getChartComponents(\n\t\t\tgraphFrameComponents,\n\t\t\t{\n\t\t\t\texcludeLegend: true,\n\t\t\t}\n\t\t);\n\t\treturn components;\n\t}\n}\n"]}
@@ -15,7 +15,7 @@ var __extends = (this && this.__extends) || (function () {
15
15
  import { AxisChart } from '../axis-chart';
16
16
  import * as Configuration from '../configuration';
17
17
  import { Skeletons } from '../interfaces/index';
18
- import { Tools } from '../tools';
18
+ import * as Tools from '../tools';
19
19
  // Components
20
20
  import { Grid, StackedArea, StackedRuler, TwoDimensionalAxes, Line, StackedScatter, Skeleton, } from '../components/index';
21
21
  var StackedAreaChart = /** @class */ (function (_super) {
@@ -1 +1 @@
1
- {"version":3,"file":"area-stacked.js","sourceRoot":"","sources":["area-stacked.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAiC,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,aAAa;AACb,OAAO,EACN,IAAI,EACJ,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,IAAI,EACJ,cAAc,EACd,QAAQ,GACR,MAAM,qBAAqB,CAA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ACnB,CAAC;IACF,uBAAC;AAAD,CAAC,AAxCD,CAAsC,SAAS,GAwC9C","sourcesContent":["// Internal Imports\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, AreaChartOptions, Skeletons } from '../interfaces/index';\nimport { Tools } from '../tools';\n\n// Components\nimport {\n\tGrid,\n\tStackedArea,\n\tStackedRuler,\n\tTwoDimensionalAxes,\n\tLine,\n\tStackedScatter,\n\tSkeleton,\n} from '../components/index';\n\nexport class StackedAreaChart extends AxisChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<AreaChartOptions>) {\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.stackedAreaChart,\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 StackedRuler(this.model, this.services),\n\t\t\tnew StackedArea(this.model, this.services),\n\t\t\tnew Line(this.model, this.services, { stacked: true }),\n\t\t\tnew StackedScatter(this.model, this.services, {\n\t\t\t\tfadeInOnChartHolderMouseover: true,\n\t\t\t\thandleThresholds: true,\n\t\t\t\tstacked: true,\n\t\t\t}),\n\t\t\tnew Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.GRID,\n\t\t\t}),\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(\n\t\t\tgraphFrameComponents\n\t\t);\n\t\treturn components;\n\t}\n}\n"]}
1
+ {"version":3,"file":"area-stacked.js","sourceRoot":"","sources":["area-stacked.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;A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7C,4BAA4B,EAAE,IAAI;gBAClC,gBAAgB,EAAE,IAAI;gBACtB,OAAO,EAAE,IAAI;aACb,CAAC;YACF,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;gBACvC,QAAQ,EAAE,SAAS,CAAC,IAAI;aACxB,CAAC;SACF,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CACpD,oBAAoB,CACpB,CAAC;QACF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,uBAAC;AAAD,CAAC,AAxCD,CAAsC,SAAS,GAwC9C","sourcesContent":["// Internal Imports\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, AreaChartOptions, Skeletons } from '../interfaces/index';\nimport * as Tools from '../tools';\n\n// Components\nimport {\n\tGrid,\n\tStackedArea,\n\tStackedRuler,\n\tTwoDimensionalAxes,\n\tLine,\n\tStackedScatter,\n\tSkeleton,\n} from '../components/index';\n\nexport class StackedAreaChart extends AxisChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<AreaChartOptions>) {\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.stackedAreaChart,\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 StackedRuler(this.model, this.services),\n\t\t\tnew StackedArea(this.model, this.services),\n\t\t\tnew Line(this.model, this.services, { stacked: true }),\n\t\t\tnew StackedScatter(this.model, this.services, {\n\t\t\t\tfadeInOnChartHolderMouseover: true,\n\t\t\t\thandleThresholds: true,\n\t\t\t\tstacked: true,\n\t\t\t}),\n\t\t\tnew Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.GRID,\n\t\t\t}),\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(\n\t\t\tgraphFrameComponents\n\t\t);\n\t\treturn components;\n\t}\n}\n"]}
package/charts/area.js CHANGED
@@ -15,7 +15,7 @@ var __extends = (this && this.__extends) || (function () {
15
15
  import { AxisChart } from '../axis-chart';
16
16
  import * as Configuration from '../configuration';
17
17
  import { Skeletons } from '../interfaces/index';
18
- import { Tools } from '../tools';
18
+ import * as Tools from '../tools';
19
19
  // Components
20
20
  import { Grid, Area, Line, Ruler, Scatter, TwoDimensionalAxes, Skeleton, } from '../components/index';
21
21
  var AreaChart = /** @class */ (function (_super) {
@@ -1 +1 @@
1
- {"version":3,"file":"area.js","sourceRoot":"","sources":["area.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAiC,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,aAAa;AACb,OAAO,EACN,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,OAAO,EACP,kBAAkB,EAKlB,QAAQ,GACR,MAAM,qBAAqB,CAAC;AAE7B;IAA+B,6BAAS;IACvC,mBAAY,MAAe,EAAE,YAA2C;QAAxE,YACC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAa3B;QAXA,2CAA2C;QAC3C,iCAAiC;QACjC,KAAI,CAAC,KAAK,CAAC,UAAU,CACpB,KAAK,CAAC,wBAAwB,CAC7B,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC,EAC5C,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QAEF,6CAA6C;QAC7C,KAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;;IACjC,CAAC;IAED,iCAAa,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,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACpC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACnC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACnC,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;gBACtC,4BAA4B,EAAE,IAAI;gBAClC,gBAAgB,EAAE,IAAI;aACtB,CAAC;YACF,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;gBACvC,QAAQ,EAAE,SAAS,CAAC,IAAI;aACxB,CAAC;SACF,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CACpD,oBAAoB,CACpB,CAAC;QACF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,gBAAC;AAAD,CAAC,AAvCD,CAA+B,SAAS,GAuCvC","sourcesContent":["// Internal Imports\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, AreaChartOptions, Skeletons } from '../interfaces/index';\nimport { Tools } from '../tools';\n\n// Components\nimport {\n\tGrid,\n\tArea,\n\tLine,\n\tRuler,\n\tScatter,\n\tTwoDimensionalAxes,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nexport class AreaChart extends AxisChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<AreaChartOptions>) {\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\tTools.clone(Configuration.options.areaChart),\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 Ruler(this.model, this.services),\n\t\t\tnew Line(this.model, this.services),\n\t\t\tnew Area(this.model, this.services),\n\t\t\tnew Scatter(this.model, this.services, {\n\t\t\t\tfadeInOnChartHolderMouseover: true,\n\t\t\t\thandleThresholds: true,\n\t\t\t}),\n\t\t\tnew Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.GRID,\n\t\t\t}),\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(\n\t\t\tgraphFrameComponents\n\t\t);\n\t\treturn components;\n\t}\n}\n"]}
1
+ {"version":3,"file":"area.js","sourceRoot":"","sources":["area.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAiC,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAElC,aAAa;AACb,OAAO,EACN,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,OAAO,EACP,kBAAkB,EAKlB,QAAQ,GACR,MAAM,qBAAqB,CAAC;AAE7B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A+B,SAAS,GAuCvC","sourcesContent":["// Internal Imports\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, AreaChartOptions, Skeletons } from '../interfaces/index';\nimport * as Tools from '../tools';\n\n// Components\nimport {\n\tGrid,\n\tArea,\n\tLine,\n\tRuler,\n\tScatter,\n\tTwoDimensionalAxes,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nexport class AreaChart extends AxisChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<AreaChartOptions>) {\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\tTools.clone(Configuration.options.areaChart),\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 Ruler(this.model, this.services),\n\t\t\tnew Line(this.model, this.services),\n\t\t\tnew Area(this.model, this.services),\n\t\t\tnew Scatter(this.model, this.services, {\n\t\t\t\tfadeInOnChartHolderMouseover: true,\n\t\t\t\thandleThresholds: true,\n\t\t\t}),\n\t\t\tnew Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.GRID,\n\t\t\t}),\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(\n\t\t\tgraphFrameComponents\n\t\t);\n\t\treturn components;\n\t}\n}\n"]}
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
14
14
  // Internal Imports
15
15
  import { AxisChart } from '../axis-chart';
16
16
  import * as Configuration from '../configuration';
17
- import { Tools } from '../tools';
17
+ import * as Tools from '../tools';
18
18
  import { Skeletons } from '../interfaces/enums';
19
19
  // Components
20
20
  import { Grid, GroupedBar, TwoDimensionalAxes, ZeroLine, Skeleton, } from '../components/index';
@@ -1 +1 @@
1
- {"version":3,"file":"bar-grouped.js","sourceRoot":"","sources":["bar-grouped.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,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,UAAU,EACV,kBAAkB,EAClB,QAAQ,EAKR,QAAQ,GACR,MAAM,qBAAqB,CAAC;AAE7B;IAAqC,mCAAS;IAC7C,yBAAY,MAAe,EAAE,YAA0C;QAAvE,YACC,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,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,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,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACzC,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,CACpB,CAAC;QACF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,sBAAC;AAAD,CAAC,AAlCD,CAAqC,SAAS,GAkC7C","sourcesContent":["// Internal Imports\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport { BarChartOptions, ChartConfig } from '../interfaces/index';\nimport { Tools } from '../tools';\nimport { Skeletons } from '../interfaces/enums';\n\n// Components\nimport {\n\tGrid,\n\tGroupedBar,\n\tTwoDimensionalAxes,\n\tZeroLine,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nexport class GroupedBarChart extends AxisChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<BarChartOptions>) {\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.groupedBarChart,\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 GroupedBar(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);\n\t\treturn components;\n\t}\n}\n"]}
1
+ {"version":3,"file":"bar-grouped.js","sourceRoot":"","sources":["bar-grouped.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,aAAa;AACb,OAAO,EACN,IAAI,EACJ,UAAU,EACV,kBAAkB,EAClB,QAAQ,EAKR,QAAQ,GACR,MAAM,qBAAqB,CAAC;AAE7B;IAAqC,mCAAS;IAC7C,yBAAY,MAAe,EAAE,YAA0C;QAAvE,YACC,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,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,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,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACzC,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,CACpB,CAAC;QACF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,sBAAC;AAAD,CAAC,AAlCD,CAAqC,SAAS,GAkC7C","sourcesContent":["// Internal Imports\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport { BarChartOptions, ChartConfig } from '../interfaces/index';\nimport * as Tools from '../tools';\nimport { Skeletons } from '../interfaces/enums';\n\n// Components\nimport {\n\tGrid,\n\tGroupedBar,\n\tTwoDimensionalAxes,\n\tZeroLine,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nexport class GroupedBarChart extends AxisChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<BarChartOptions>) {\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.groupedBarChart,\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 GroupedBar(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);\n\t\treturn components;\n\t}\n}\n"]}
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
14
14
  // Internal Imports
15
15
  import { AxisChart } from '../axis-chart';
16
16
  import * as Configuration from '../configuration';
17
- import { Tools } from '../tools';
17
+ import * as Tools from '../tools';
18
18
  import { Skeletons } from '../interfaces/enums';
19
19
  // Components
20
20
  import { Grid, SimpleBar, TwoDimensionalAxes, ZeroLine, Skeleton, } from '../components/index';
@@ -1 +1 @@
1
- {"version":3,"file":"bar-simple.js","sourceRoot":"","sources":["bar-simple.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,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,SAAS,EACT,kBAAkB,EAClB,QAAQ,EAKR,QAAQ,GACR,MAAM,qBAAqB,CAAC;AAE7B;IAAoC,kCAAS;IAC5C,wBAAY,MAAe,EAAE,YAA0C;QAAvE,YACC,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,kBAAkB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACjD,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACnC,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACxC,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,CACpB,CAAC;QACF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,qBAAC;AAAD,CAAC,AAlCD,CAAoC,SAAS,GAkC5C","sourcesContent":["// Internal Imports\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport { BarChartOptions, ChartConfig } from '../interfaces/index';\nimport { Tools } from '../tools';\nimport { Skeletons } from '../interfaces/enums';\n\n// Components\nimport {\n\tGrid,\n\tSimpleBar,\n\tTwoDimensionalAxes,\n\tZeroLine,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nexport class SimpleBarChart extends AxisChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<BarChartOptions>) {\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.simpleBarChart,\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 SimpleBar(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);\n\t\treturn components;\n\t}\n}\n"]}
1
+ {"version":3,"file":"bar-simple.js","sourceRoot":"","sources":["bar-simple.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,aAAa;AACb,OAAO,EACN,IAAI,EACJ,SAAS,EACT,kBAAkB,EAClB,QAAQ,EAKR,QAAQ,GACR,MAAM,qBAAqB,CAAC;AAE7B;IAAoC,kCAAS;IAC5C,wBAAY,MAAe,EAAE,YAA0C;QAAvE,YACC,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,kBAAkB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACjD,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACnC,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACxC,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,CACpB,CAAC;QACF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,qBAAC;AAAD,CAAC,AAlCD,CAAoC,SAAS,GAkC5C","sourcesContent":["// Internal Imports\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport { BarChartOptions, ChartConfig } from '../interfaces/index';\nimport * as Tools from '../tools';\nimport { Skeletons } from '../interfaces/enums';\n\n// Components\nimport {\n\tGrid,\n\tSimpleBar,\n\tTwoDimensionalAxes,\n\tZeroLine,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nexport class SimpleBarChart extends AxisChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<BarChartOptions>) {\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.simpleBarChart,\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 SimpleBar(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);\n\t\treturn components;\n\t}\n}\n"]}
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
14
14
  // Internal Imports
15
15
  import { AxisChart } from '../axis-chart';
16
16
  import * as Configuration from '../configuration';
17
- import { Tools } from '../tools';
17
+ import * as Tools from '../tools';
18
18
  import { Skeletons } from '../interfaces/enums';
19
19
  // Components
20
20
  import { Grid, StackedBar, StackedRuler, TwoDimensionalAxes, ZeroLine, Skeleton, } from '../components/index';
@@ -1 +1 @@
1
- {"version":3,"file":"bar-stacked.js","sourceRoot":"","sources":["bar-stacked.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,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,UAAU,EACV,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EAKR,QAAQ,GACR,MAAM,qBAAqB,CAAC;AAE7B;IAAqC,mCAAS;IAC7C,yBAAY,MAAe,EAAE,YAA0C;QAAvE,YACC,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,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,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,YAAY,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YAC3C,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACzC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;gBACvC,QAAQ,EAAE,SAAS,CAAC,aAAa;aACjC,CAAC;YACF,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;SACvC,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CACpD,oBAAoB,CACpB,CAAC;QACF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,sBAAC;AAAD,CAAC,AAnCD,CAAqC,SAAS,GAmC7C","sourcesContent":["// Internal Imports\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, BarChartOptions } from '../interfaces/index';\nimport { Tools } from '../tools';\nimport { Skeletons } from '../interfaces/enums';\n\n// Components\nimport {\n\tGrid,\n\tStackedBar,\n\tStackedRuler,\n\tTwoDimensionalAxes,\n\tZeroLine,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nexport class StackedBarChart extends AxisChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<BarChartOptions>) {\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.stackedBarChart,\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 StackedRuler(this.model, this.services),\n\t\t\tnew StackedBar(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\tnew ZeroLine(this.model, this.services),\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(\n\t\t\tgraphFrameComponents\n\t\t);\n\t\treturn components;\n\t}\n}\n"]}
1
+ {"version":3,"file":"bar-stacked.js","sourceRoot":"","sources":["bar-stacked.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,aAAa;AACb,OAAO,EACN,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EAKR,QAAQ,GACR,MAAM,qBAAqB,CAAC;AAE7B;IAAqC,mCAAS;IAC7C,yBAAY,MAAe,EAAE,YAA0C;QAAvE,YACC,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,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,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,YAAY,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YAC3C,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACzC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;gBACvC,QAAQ,EAAE,SAAS,CAAC,aAAa;aACjC,CAAC;YACF,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;SACvC,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CACpD,oBAAoB,CACpB,CAAC;QACF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,sBAAC;AAAD,CAAC,AAnCD,CAAqC,SAAS,GAmC7C","sourcesContent":["// Internal Imports\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, BarChartOptions } from '../interfaces/index';\nimport * as Tools from '../tools';\nimport { Skeletons } from '../interfaces/enums';\n\n// Components\nimport {\n\tGrid,\n\tStackedBar,\n\tStackedRuler,\n\tTwoDimensionalAxes,\n\tZeroLine,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nexport class StackedBarChart extends AxisChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<BarChartOptions>) {\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.stackedBarChart,\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 StackedRuler(this.model, this.services),\n\t\t\tnew StackedBar(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\tnew ZeroLine(this.model, this.services),\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(\n\t\t\tgraphFrameComponents\n\t\t);\n\t\treturn components;\n\t}\n}\n"]}
package/charts/boxplot.js CHANGED
@@ -15,7 +15,7 @@ var __extends = (this && this.__extends) || (function () {
15
15
  import { BoxplotChartModel } from '../model/boxplot';
16
16
  import { AxisChart } from '../axis-chart';
17
17
  import * as Configuration from '../configuration';
18
- import { Tools } from '../tools';
18
+ import * as Tools from '../tools';
19
19
  import { Skeletons } from '../interfaces/enums';
20
20
  // Components
21
21
  import { Grid, Boxplot, TwoDimensionalAxes, ZeroLine, Skeleton, } from '../components/index';
@@ -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;AAC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A4C1C","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,mB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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 * as 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"]}
package/charts/bubble.js CHANGED
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
14
14
  // Internal Imports
15
15
  import { AxisChart } from '../axis-chart';
16
16
  import * as Configuration from '../configuration';
17
- import { Tools } from '../tools';
17
+ import * as Tools from '../tools';
18
18
  import { Skeletons } from '../interfaces/enums';
19
19
  // Components
20
20
  import { Grid, Ruler, Bubble, TwoDimensionalAxes, Skeleton, } from '../components/index';
@@ -1 +1 @@
1
- {"version":3,"file":"bubble.js","sourceRoot":"","sources":["bubble.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,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,KAAK,EACL,MAAM,EACN,kBAAkB,EAKlB,QAAQ,GACR,MAAM,qBAAqB,CAAC;AAE7B;IAAiC,+BAAS;IACzC,qBACC,MAAe,EACf,YAA6C;QAF9C,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,WAAW,EACjC,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QAEF,6CAA6C;QAC7C,KAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;;IACjC,CAAC;IAED,mCAAa,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,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACpC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACrC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;gBACvC,QAAQ,EAAE,SAAS,CAAC,IAAI;aACxB,CAAC;SACF,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CACpD,oBAAoB,CACpB,CAAC;QACF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,kBAAC;AAAD,CAAC,AArCD,CAAiC,SAAS,GAqCzC","sourcesContent":["// Internal Imports\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, BubbleChartOptions } from '../interfaces/index';\nimport { Tools } from '../tools';\nimport { Skeletons } from '../interfaces/enums';\n\n// Components\nimport {\n\tGrid,\n\tRuler,\n\tBubble,\n\tTwoDimensionalAxes,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nexport class BubbleChart extends AxisChart {\n\tconstructor(\n\t\tholder: Element,\n\t\tchartConfigs: ChartConfig<BubbleChartOptions>\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.bubbleChart,\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 Ruler(this.model, this.services),\n\t\t\tnew Bubble(this.model, this.services),\n\t\t\tnew Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.GRID,\n\t\t\t}),\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(\n\t\t\tgraphFrameComponents\n\t\t);\n\t\treturn components;\n\t}\n}\n"]}
1
+ {"version":3,"file":"bubble.js","sourceRoot":"","sources":["bubble.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,aAAa;AACb,OAAO,EACN,IAAI,EACJ,KAAK,EACL,MAAM,EACN,kBAAkB,EAKlB,QAAQ,GACR,MAAM,qBAAqB,CAAC;AAE7B;IAAiC,+BAAS;IACzC,qBACC,MAAe,EACf,YAA6C;QAF9C,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,WAAW,EACjC,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QAEF,6CAA6C;QAC7C,KAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;;IACjC,CAAC;IAED,mCAAa,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,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACpC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACrC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;gBACvC,QAAQ,EAAE,SAAS,CAAC,IAAI;aACxB,CAAC;SACF,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CACpD,oBAAoB,CACpB,CAAC;QACF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,kBAAC;AAAD,CAAC,AArCD,CAAiC,SAAS,GAqCzC","sourcesContent":["// Internal Imports\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, BubbleChartOptions } from '../interfaces/index';\nimport * as Tools from '../tools';\nimport { Skeletons } from '../interfaces/enums';\n\n// Components\nimport {\n\tGrid,\n\tRuler,\n\tBubble,\n\tTwoDimensionalAxes,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nexport class BubbleChart extends AxisChart {\n\tconstructor(\n\t\tholder: Element,\n\t\tchartConfigs: ChartConfig<BubbleChartOptions>\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.bubbleChart,\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 Ruler(this.model, this.services),\n\t\t\tnew Bubble(this.model, this.services),\n\t\t\tnew Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.GRID,\n\t\t\t}),\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(\n\t\t\tgraphFrameComponents\n\t\t);\n\t\treturn components;\n\t}\n}\n"]}
package/charts/bullet.js CHANGED
@@ -15,7 +15,7 @@ var __extends = (this && this.__extends) || (function () {
15
15
  import { AxisChart } from '../axis-chart';
16
16
  import { BulletChartModel } from '../model/bullet';
17
17
  import * as Configuration from '../configuration';
18
- import { Tools } from '../tools';
18
+ import * as Tools from '../tools';
19
19
  import { Skeletons } from '../interfaces/enums';
20
20
  // Components
21
21
  import { Bullet, Grid, TwoDimensionalAxes, Skeleton, } from '../components/index';
@@ -1 +1 @@
1
- {"version":3,"file":"bullet.js","sourceRoot":"","sources":["bullet.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,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,MAAM,EACN,IAAI,EACJ,kBAAkB,EAIlB,QAAQ,GACR,MAAM,qBAAqB,CAAC;AAE7B;IAAiC,+BAAS;IAGzC,qBACC,MAAe,EACf,YAA6C;QAF9C,YAIC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAa3B;QAnBD,WAAK,GAAG,IAAI,gBAAgB,CAAC,KAAI,CAAC,QAAQ,CAAC,CAAC;QAQ3C,2CAA2C;QAC3C,iCAAiC;QACjC,KAAI,CAAC,KAAK,CAAC,UAAU,CACpB,KAAK,CAAC,wBAAwB,CAC7B,aAAa,CAAC,OAAO,CAAC,WAAW,EACjC,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QAEF,6CAA6C;QAC7C,KAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;;IACjC,CAAC;IAED,mCAAa,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,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACrC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;gBACvC,QAAQ,EAAE,SAAS,CAAC,IAAI;aACxB,CAAC;SACF,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CACpD,oBAAoB,CACpB,CAAC;QACF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,kBAAC;AAAD,CAAC,AAtCD,CAAiC,SAAS,GAsCzC","sourcesContent":["// Internal Imports\nimport { AxisChart } from '../axis-chart';\nimport { BulletChartModel } from '../model/bullet';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, BulletChartOptions } from '../interfaces/index';\nimport { Tools } from '../tools';\nimport { Skeletons } from '../interfaces/enums';\n\n// Components\nimport {\n\tBullet,\n\tGrid,\n\tTwoDimensionalAxes,\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 BulletChart extends AxisChart {\n\tmodel = new BulletChartModel(this.services);\n\n\tconstructor(\n\t\tholder: Element,\n\t\tchartConfigs: ChartConfig<BulletChartOptions>\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.bulletChart,\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 Bullet(this.model, this.services),\n\t\t\tnew Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.GRID,\n\t\t\t}),\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(\n\t\t\tgraphFrameComponents\n\t\t);\n\t\treturn components;\n\t}\n}\n"]}
1
+ {"version":3,"file":"bullet.js","sourceRoot":"","sources":["bullet.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,aAAa;AACb,OAAO,EACN,MAAM,EACN,IAAI,EACJ,kBAAkB,EAIlB,QAAQ,GACR,MAAM,qBAAqB,CAAC;AAE7B;IAAiC,+BAAS;IAGzC,qBACC,MAAe,EACf,YAA6C;QAF9C,YAIC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAa3B;QAnBD,WAAK,GAAG,IAAI,gBAAgB,CAAC,KAAI,CAAC,QAAQ,CAAC,CAAC;QAQ3C,2CAA2C;QAC3C,iCAAiC;QACjC,KAAI,CAAC,KAAK,CAAC,UAAU,CACpB,KAAK,CAAC,wBAAwB,CAC7B,aAAa,CAAC,OAAO,CAAC,WAAW,EACjC,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QAEF,6CAA6C;QAC7C,KAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;;IACjC,CAAC;IAED,mCAAa,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,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACrC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;gBACvC,QAAQ,EAAE,SAAS,CAAC,IAAI;aACxB,CAAC;SACF,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CACpD,oBAAoB,CACpB,CAAC;QACF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,kBAAC;AAAD,CAAC,AAtCD,CAAiC,SAAS,GAsCzC","sourcesContent":["// Internal Imports\nimport { AxisChart } from '../axis-chart';\nimport { BulletChartModel } from '../model/bullet';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, BulletChartOptions } from '../interfaces/index';\nimport * as Tools from '../tools';\nimport { Skeletons } from '../interfaces/enums';\n\n// Components\nimport {\n\tBullet,\n\tGrid,\n\tTwoDimensionalAxes,\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 BulletChart extends AxisChart {\n\tmodel = new BulletChartModel(this.services);\n\n\tconstructor(\n\t\tholder: Element,\n\t\tchartConfigs: ChartConfig<BulletChartOptions>\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.bulletChart,\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 Bullet(this.model, this.services),\n\t\t\tnew Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.GRID,\n\t\t\t}),\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(\n\t\t\tgraphFrameComponents\n\t\t);\n\t\treturn components;\n\t}\n}\n"]}
@@ -15,7 +15,7 @@ var __extends = (this && this.__extends) || (function () {
15
15
  import { Chart } from '../chart';
16
16
  import { CirclePackChartModel } from '../model/circle-pack';
17
17
  import * as Configuration from '../configuration';
18
- import { Tools } from '../tools';
18
+ import * as Tools from '../tools';
19
19
  // Components
20
20
  import { CirclePack, } from '../components/index';
21
21
  var CirclePackChart = /** @class */ (function (_super) {
@@ -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,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"]}
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,KAAK,KAAK,MAAM,UAAU,CAAC;AAElC,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 * as 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/combo.js CHANGED
@@ -23,7 +23,7 @@ var _a;
23
23
  import { AxisChart } from '../axis-chart';
24
24
  import * as Configuration from '../configuration';
25
25
  import { ChartTypes, Skeletons, } from '../interfaces/index';
26
- import { Tools } from '../tools';
26
+ import * as Tools from '../tools';
27
27
  // Components
28
28
  import { Grid, GroupedBar, SimpleBar, StackedBar, Line, TwoDimensionalAxes, ZeroLine, Scatter, StackedScatter, Area, StackedArea, Ruler, StackedRuler, Skeleton, } from '../components/index';
29
29
  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I,KAAK,UAAU,CAAC,YAAY;QAD5C,CAC4C,CAC7C,CAAC;QAEF,gDAAgD;QAChD,IAAM,oBAAoB;YACzB,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,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;gBACvC,QAAQ,EAAE,SAAS,CAAC,IAAI;aACxB,CAAC;WACC,CAAC,mBAAmB;YACtB,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EACvC,IAAI,CAAC,kBAAkB,EAAE,CAC5B,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CACpD,oBAAoB,CACpB,CAAC;QAEF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,iBAAC;AAAD,CAAC,AAnHD,CAAgC,SAAS,GAmHxC","sourcesContent":["// Internal Imports\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport {\n\tChartConfig,\n\tComboChartOptions,\n\tChartTypes,\n\tSkeletons,\n} from '../interfaces/index';\nimport { Tools } from '../tools';\n\n// Components\nimport {\n\tGrid,\n\tGroupedBar,\n\tSimpleBar,\n\tStackedBar,\n\tLine,\n\tTwoDimensionalAxes,\n\tZeroLine,\n\tScatter,\n\tStackedScatter,\n\tArea,\n\tStackedArea,\n\tRuler,\n\tStackedRuler,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tLegend,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nconst graphComponentsMap = {\n\t[ChartTypes.LINE]: [Line, Scatter],\n\t[ChartTypes.SCATTER]: [Scatter],\n\t[ChartTypes.AREA]: [Area, Line, Scatter],\n\t[ChartTypes.STACKED_AREA]: [\n\t\tStackedArea,\n\t\tLine,\n\t\tStackedScatter,\n\t\tStackedRuler,\n\t],\n\t[ChartTypes.SIMPLE_BAR]: [SimpleBar],\n\t[ChartTypes.GROUPED_BAR]: [GroupedBar, ZeroLine],\n\t[ChartTypes.STACKED_BAR]: [StackedBar, StackedRuler],\n};\n\nexport class ComboChart extends AxisChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<ComboChartOptions>) {\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\tconst chartOptions = Tools.mergeDefaultChartOptions(\n\t\t\tConfiguration.options.comboChart,\n\t\t\tchartConfigs.options\n\t\t);\n\n\t\t// Warn user if no comboChartTypes defined\n\t\t// Use skeleton chart instead\n\t\tif (!chartConfigs.options.comboChartTypes) {\n\t\t\tconsole.error('No comboChartTypes defined for the Combo Chart!');\n\t\t\t// add a default chart to get an empty chart\n\t\t\tchartOptions.comboChartTypes = [\n\t\t\t\t{ type: ChartTypes.LINE, correspondingDatasets: [] },\n\t\t\t];\n\t\t}\n\n\t\t// set the global options\n\t\tthis.model.setOptions(chartOptions);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetGraphComponents() {\n\t\tconst { comboChartTypes } = this.model.getOptions();\n\t\tlet counter = 0;\n\t\tconst graphComponents = comboChartTypes\n\t\t\t.map((graph) => {\n\t\t\t\tconst type = graph.type;\n\t\t\t\tlet options;\n\n\t\t\t\t// initializes the components using input strings with the base configs for each chart\n\t\t\t\tif (typeof graph.type === 'string') {\n\t\t\t\t\t// check if it is in the components map\n\t\t\t\t\t// if it isn't then it is not a valid carbon chart to use in combo\n\t\t\t\t\tif (!Object.keys(graphComponentsMap).includes(graph.type)) {\n\t\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t\t`Invalid chart type \"${graph.type}\" specified for combo chart. Please refer to the ComboChart tutorial for more guidance.`\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tlet stacked;\n\t\t\t\t\toptions = Tools.merge(\n\t\t\t\t\t\t{},\n\t\t\t\t\t\tConfiguration.options[\n\t\t\t\t\t\t\t`${Tools.camelCase(graph.type)}Chart`\n\t\t\t\t\t\t],\n\t\t\t\t\t\tthis.model.getOptions(),\n\t\t\t\t\t\tgraph.options\n\t\t\t\t\t);\n\t\t\t\t\t// if we are creating a stacked area, the contained Line chart needs to know it is stacked\n\t\t\t\t\tif (graph.type === ChartTypes.STACKED_AREA) {\n\t\t\t\t\t\tstacked = true;\n\t\t\t\t\t}\n\t\t\t\t\treturn graphComponentsMap[graph.type].map(\n\t\t\t\t\t\t(Component, i) =>\n\t\t\t\t\t\t\tnew Component(this.model, this.services, {\n\t\t\t\t\t\t\t\tgroups: graph.correspondingDatasets,\n\t\t\t\t\t\t\t\tid: counter++,\n\t\t\t\t\t\t\t\toptions: options,\n\t\t\t\t\t\t\t\tstacked,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t// user has imported a type or custom component to instantiate\n\t\t\t\t\toptions = Tools.merge(\n\t\t\t\t\t\t{},\n\t\t\t\t\t\tthis.model.getOptions(),\n\t\t\t\t\t\tgraph.options\n\t\t\t\t\t);\n\t\t\t\t\treturn new type(this.model, this.services, {\n\t\t\t\t\t\tgroups: graph.correspondingDatasets,\n\t\t\t\t\t\tid: counter++,\n\t\t\t\t\t\toptions: options,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t})\n\t\t\t.filter((item) => item !== null);\n\n\t\treturn Tools.flatten(graphComponents);\n\t}\n\n\tgetComponents() {\n\t\tconst { comboChartTypes } = this.model.getOptions();\n\t\t// don't add the regular ruler if stacked ruler is added\n\t\tconst stackedRulerEnabled = comboChartTypes.some(\n\t\t\t(chartObject) =>\n\t\t\t\tchartObject.type === ChartTypes.STACKED_BAR ||\n\t\t\t\tchartObject.type === ChartTypes.STACKED_AREA\n\t\t);\n\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 Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.GRID,\n\t\t\t}),\n\t\t\t...(stackedRulerEnabled\n\t\t\t\t? []\n\t\t\t\t: [new Ruler(this.model, this.services)]),\n\t\t\t...this.getGraphComponents(),\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"]}
1
+ {"version":3,"file":"combo.js","sourceRoot":"","sources":["combo.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAGN,UAAU,EACV,SAAS,GACT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAElC,aAAa;AACb,OAAO,EACN,IAAI,EACJ,UAAU,EACV,SAAS,EACT,UAAU,EACV,IAAI,EACJ,kBAAkB,EAClB,QAAQ,EACR,OAAO,EACP,cAAc,EACd,IAAI,EACJ,WAAW,EACX,KAAK,EACL,YAAY,EAIZ,QAAQ,GACR,MAAM,qBAAqB,CAAC;AAE7B,IAAM,kBAAkB;IACvB,GAAC,UAAU,CAAC,IAAI,IAAG,CAAC,IAAI,EAAE,OAAO,CAAC;IAClC,GAAC,UAAU,CAAC,OAAO,IAAG,CAAC,OAAO,CAAC;IAC/B,GAAC,UAAU,CAAC,IAAI,IAAG,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC;IACxC,GAAC,UAAU,CAAC,YAAY,IAAG;QAC1B,WAAW;QACX,IAAI;QACJ,cAAc;QACd,YAAY;KACZ;IACD,GA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;QACF,CAAC,CAAC;aACD,MAAM,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,KAAK,IAAI,EAAb,CAAa,CAAC,CAAC;QAElC,OAAO,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IACvC,CAAC;IAED,kCAAa,GAAb;QACS,IAAA,yDAAe,CAA6B;QACpD,wDAAwD;QACxD,IAAM,mBAAmB,GAAG,eAAe,CAAC,IAAI,CAC/C,UAAC,WAAW;YACX,OAAA,WAAW,CAAC,IAAI,KAAK,UAAU,CAAC,WAAW;gBAC3C,WAAW,CAAC,IAAI,KAAK,UAAU,CAAC,YAAY;QAD5C,CAC4C,CAC7C,CAAC;QAEF,gDAAgD;QAChD,IAAM,oBAAoB;YACzB,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,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;gBACvC,QAAQ,EAAE,SAAS,CAAC,IAAI;aACxB,CAAC;WACC,CAAC,mBAAmB;YACtB,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EACvC,IAAI,CAAC,kBAAkB,EAAE,CAC5B,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CACpD,oBAAoB,CACpB,CAAC;QAEF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,iBAAC;AAAD,CAAC,AAnHD,CAAgC,SAAS,GAmHxC","sourcesContent":["// Internal Imports\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport {\n\tChartConfig,\n\tComboChartOptions,\n\tChartTypes,\n\tSkeletons,\n} from '../interfaces/index';\nimport * as Tools from '../tools';\n\n// Components\nimport {\n\tGrid,\n\tGroupedBar,\n\tSimpleBar,\n\tStackedBar,\n\tLine,\n\tTwoDimensionalAxes,\n\tZeroLine,\n\tScatter,\n\tStackedScatter,\n\tArea,\n\tStackedArea,\n\tRuler,\n\tStackedRuler,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tLegend,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nconst graphComponentsMap = {\n\t[ChartTypes.LINE]: [Line, Scatter],\n\t[ChartTypes.SCATTER]: [Scatter],\n\t[ChartTypes.AREA]: [Area, Line, Scatter],\n\t[ChartTypes.STACKED_AREA]: [\n\t\tStackedArea,\n\t\tLine,\n\t\tStackedScatter,\n\t\tStackedRuler,\n\t],\n\t[ChartTypes.SIMPLE_BAR]: [SimpleBar],\n\t[ChartTypes.GROUPED_BAR]: [GroupedBar, ZeroLine],\n\t[ChartTypes.STACKED_BAR]: [StackedBar, StackedRuler],\n};\n\nexport class ComboChart extends AxisChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<ComboChartOptions>) {\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\tconst chartOptions = Tools.mergeDefaultChartOptions(\n\t\t\tConfiguration.options.comboChart,\n\t\t\tchartConfigs.options\n\t\t);\n\n\t\t// Warn user if no comboChartTypes defined\n\t\t// Use skeleton chart instead\n\t\tif (!chartConfigs.options.comboChartTypes) {\n\t\t\tconsole.error('No comboChartTypes defined for the Combo Chart!');\n\t\t\t// add a default chart to get an empty chart\n\t\t\tchartOptions.comboChartTypes = [\n\t\t\t\t{ type: ChartTypes.LINE, correspondingDatasets: [] },\n\t\t\t];\n\t\t}\n\n\t\t// set the global options\n\t\tthis.model.setOptions(chartOptions);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetGraphComponents() {\n\t\tconst { comboChartTypes } = this.model.getOptions();\n\t\tlet counter = 0;\n\t\tconst graphComponents = comboChartTypes\n\t\t\t.map((graph) => {\n\t\t\t\tconst type = graph.type;\n\t\t\t\tlet options;\n\n\t\t\t\t// initializes the components using input strings with the base configs for each chart\n\t\t\t\tif (typeof graph.type === 'string') {\n\t\t\t\t\t// check if it is in the components map\n\t\t\t\t\t// if it isn't then it is not a valid carbon chart to use in combo\n\t\t\t\t\tif (!Object.keys(graphComponentsMap).includes(graph.type)) {\n\t\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t\t`Invalid chart type \"${graph.type}\" specified for combo chart. Please refer to the ComboChart tutorial for more guidance.`\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tlet stacked;\n\t\t\t\t\toptions = Tools.merge(\n\t\t\t\t\t\t{},\n\t\t\t\t\t\tConfiguration.options[\n\t\t\t\t\t\t\t`${Tools.camelCase(graph.type)}Chart`\n\t\t\t\t\t\t],\n\t\t\t\t\t\tthis.model.getOptions(),\n\t\t\t\t\t\tgraph.options\n\t\t\t\t\t);\n\t\t\t\t\t// if we are creating a stacked area, the contained Line chart needs to know it is stacked\n\t\t\t\t\tif (graph.type === ChartTypes.STACKED_AREA) {\n\t\t\t\t\t\tstacked = true;\n\t\t\t\t\t}\n\t\t\t\t\treturn graphComponentsMap[graph.type].map(\n\t\t\t\t\t\t(Component, i) =>\n\t\t\t\t\t\t\tnew Component(this.model, this.services, {\n\t\t\t\t\t\t\t\tgroups: graph.correspondingDatasets,\n\t\t\t\t\t\t\t\tid: counter++,\n\t\t\t\t\t\t\t\toptions: options,\n\t\t\t\t\t\t\t\tstacked,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t// user has imported a type or custom component to instantiate\n\t\t\t\t\toptions = Tools.merge(\n\t\t\t\t\t\t{},\n\t\t\t\t\t\tthis.model.getOptions(),\n\t\t\t\t\t\tgraph.options\n\t\t\t\t\t);\n\t\t\t\t\treturn new type(this.model, this.services, {\n\t\t\t\t\t\tgroups: graph.correspondingDatasets,\n\t\t\t\t\t\tid: counter++,\n\t\t\t\t\t\toptions: options,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t})\n\t\t\t.filter((item) => item !== null);\n\n\t\treturn Tools.flatten(graphComponents);\n\t}\n\n\tgetComponents() {\n\t\tconst { comboChartTypes } = this.model.getOptions();\n\t\t// don't add the regular ruler if stacked ruler is added\n\t\tconst stackedRulerEnabled = comboChartTypes.some(\n\t\t\t(chartObject) =>\n\t\t\t\tchartObject.type === ChartTypes.STACKED_BAR ||\n\t\t\t\tchartObject.type === ChartTypes.STACKED_AREA\n\t\t);\n\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 Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.GRID,\n\t\t\t}),\n\t\t\t...(stackedRulerEnabled\n\t\t\t\t? []\n\t\t\t\t: [new Ruler(this.model, this.services)]),\n\t\t\t...this.getGraphComponents(),\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/donut.js CHANGED
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
14
14
  // Internal Imports
15
15
  import { PieChart } from './pie';
16
16
  import * as Configuration from '../configuration';
17
- import { Tools } from '../tools';
17
+ import * as Tools from '../tools';
18
18
  import { Skeletons } from '../interfaces/enums';
19
19
  // Components
20
20
  import { Donut, Skeleton, } from '../components/index';
@@ -1 +1 @@
1
- {"version":3,"file":"donut.js","sourceRoot":"","sources":["donut.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,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,KAAK,EAIL,QAAQ,GACR,MAAM,qBAAqB,CAAC;AAE7B;IAAgC,8BAAQ;IACvC,oBAAY,MAAe,EAAE,YAA0C;QAAvE,YACC,kBAAM,MAAM,EAAE,YAAY,EAAE,IAAI,CAAC,SAajC;QAXA,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,GAAU;YACnC,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACpC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;gBACvC,QAAQ,EAAE,SAAS,CAAC,KAAK;aACzB,CAAC;SACF,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;QACxE,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,iBAAC;AAAD,CAAC,AA7BD,CAAgC,QAAQ,GA6BvC","sourcesContent":["// Internal Imports\nimport { PieChart } from './pie';\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\tDonut,\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 DonutChart extends PieChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<PieChartOptions>) {\n\t\tsuper(holder, chartConfigs, true);\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.donutChart,\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 Donut(this.model, this.services),\n\t\t\tnew Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.DONUT,\n\t\t\t}),\n\t\t];\n\n\t\tconst components: any[] = this.getChartComponents(graphFrameComponents);\n\t\treturn components;\n\t}\n}\n"]}
1
+ {"version":3,"file":"donut.js","sourceRoot":"","sources":["donut.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,aAAa;AACb,OAAO,EACN,KAAK,EAIL,QAAQ,GACR,MAAM,qBAAqB,CAAC;AAE7B;IAAgC,8BAAQ;IACvC,oBAAY,MAAe,EAAE,YAA0C;QAAvE,YACC,kBAAM,MAAM,EAAE,YAAY,EAAE,IAAI,CAAC,SAajC;QAXA,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,GAAU;YACnC,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACpC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;gBACvC,QAAQ,EAAE,SAAS,CAAC,KAAK;aACzB,CAAC;SACF,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;QACxE,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,iBAAC;AAAD,CAAC,AA7BD,CAAgC,QAAQ,GA6BvC","sourcesContent":["// Internal Imports\nimport { PieChart } from './pie';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, PieChartOptions } from '../interfaces/index';\nimport * as Tools from '../tools';\nimport { Skeletons } from '../interfaces/enums';\n\n// Components\nimport {\n\tDonut,\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 DonutChart extends PieChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<PieChartOptions>) {\n\t\tsuper(holder, chartConfigs, true);\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.donutChart,\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 Donut(this.model, this.services),\n\t\t\tnew Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.DONUT,\n\t\t\t}),\n\t\t];\n\n\t\tconst components: any[] = this.getChartComponents(graphFrameComponents);\n\t\treturn components;\n\t}\n}\n"]}
package/charts/gauge.js CHANGED
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
14
14
  // Internal Imports
15
15
  import { Chart } from '../chart';
16
16
  import * as Configuration from '../configuration';
17
- import { Tools } from '../tools';
17
+ import * as Tools from '../tools';
18
18
  import { GaugeChartModel } from '../model/gauge';
19
19
  // Components
20
20
  import { Gauge } from '../components/index';
@@ -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,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"]}
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,KAAK,KAAK,MAAM,UAAU,CAAC;AAClC,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 * as 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"]}
package/charts/heatmap.js CHANGED
@@ -22,7 +22,7 @@ var __spreadArrays = (this && this.__spreadArrays) || function () {
22
22
  import { HeatmapModel } from '../model/heatmap';
23
23
  import { AxisChart } from '../axis-chart';
24
24
  import * as Configuration from '../configuration';
25
- import { Tools } from '../tools';
25
+ import * as Tools from '../tools';
26
26
  import { LayoutDirection, LayoutGrowth, RenderTypes, LayoutAlignItems, } from '../interfaces/index';
27
27
  import { Heatmap, TwoDimensionalAxes, Modal, LayoutComponent, ColorScaleLegend, Title, AxisChartsTooltip, Spacer, Toolbar, } from '../components';
28
28
  var HeatmapChart = /** @class */ (function (_super) {
@@ -1 +1 @@
1
- {"version":3,"file":"heatmap.js","sourceRoot":"","sources":["heatmap.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,EAEN,eAAe,EACf,YAAY,EAEZ,WAAW,EACX,gBAAgB,GAChB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACN,OAAO,EACP,kBAAkB,EAClB,KAAK,EACL,eAAe,EACf,gBAAgB,EAChB,KAAK,EACL,iBAAiB,EACjB,MAAM,EACN,OAAO,GAGP,MAAM,eAAe,CAAC;AAEvB;IAAkC,gCAAS;IAG1C,sBACC,MAAe,EACf,YAA8C;QAF/C,YAIC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAa3B;QAnBD,WAAK,GAAG,IAAI,YAAY,CAAC,KAAI,CAAC,QAAQ,CAAC,CAAC;QAQvC,2CAA2C;QAC3C,iCAAiC;QACjC,KAAI,CAAC,KAAK,CAAC,UAAU,CACpB,KAAK,CAAC,wBAAwB,CAC7B,aAAa,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5B,IAAI,kBAAkB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACjD,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;SACtC,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CACpD,oBAAoB,CACpB,CAAC;QACF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,mBAAC;AAAD,CAAC,AAjKD,CAAkC,SAAS,GAiK1C","sourcesContent":["// Internal Imports\nimport { HeatmapModel } from '../model/heatmap';\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport { Tools } from '../tools';\n\nimport {\n\tHeatmapChartOptions,\n\tLayoutDirection,\n\tLayoutGrowth,\n\tChartConfig,\n\tRenderTypes,\n\tLayoutAlignItems,\n} from '../interfaces/index';\n\nimport {\n\tHeatmap,\n\tTwoDimensionalAxes,\n\tModal,\n\tLayoutComponent,\n\tColorScaleLegend,\n\tTitle,\n\tAxisChartsTooltip,\n\tSpacer,\n\tToolbar,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n} from '../components';\n\nexport class HeatmapChart extends AxisChart {\n\tmodel = new HeatmapModel(this.services);\n\n\tconstructor(\n\t\tholder: Element,\n\t\tchartConfigs: ChartConfig<HeatmapChartOptions>\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.heatmapChart,\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\t// Custom getChartComponents - Implements getChartComponents\n\t// Removes zoombar support and additional `features` that are not supported in heatmap\n\tprotected getAxisChartComponents(\n\t\tgraphFrameComponents: any[],\n\t\tconfigs?: any\n\t) {\n\t\tconst options = this.model.getOptions();\n\t\tconst toolbarEnabled = Tools.getProperty(options, 'toolbar', 'enabled');\n\n\t\tthis.services.cartesianScales.determineAxisDuality();\n\t\tthis.services.cartesianScales.findDomainAndRangeAxes(); // need to do this before getMainXAxisPosition()\n\t\tthis.services.cartesianScales.determineOrientation();\n\n\t\tconst titleAvailable = !!this.model.getOptions().title;\n\t\tconst titleComponent = {\n\t\t\tid: 'title',\n\t\t\tcomponents: [new Title(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.STRETCH,\n\t\t};\n\n\t\tconst toolbarComponent = {\n\t\t\tid: 'toolbar',\n\t\t\tcomponents: [new Toolbar(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t};\n\n\t\tconst headerComponent = {\n\t\t\tid: 'header',\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// always add title to keep layout correct\n\t\t\t\t\t\ttitleComponent,\n\t\t\t\t\t\t...(toolbarEnabled ? [toolbarComponent] : []),\n\t\t\t\t\t],\n\t\t\t\t\t{\n\t\t\t\t\t\tdirection: LayoutDirection.ROW,\n\t\t\t\t\t\talignItems: LayoutAlignItems.CENTER,\n\t\t\t\t\t}\n\t\t\t\t),\n\t\t\t],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t};\n\n\t\tconst legendComponent = {\n\t\t\tid: 'legend',\n\t\t\tcomponents: [new ColorScaleLegend(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t\trenderType: RenderTypes.SVG,\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: RenderTypes.SVG,\n\t\t};\n\n\t\tconst isLegendEnabled =\n\t\t\tTools.getProperty(configs, 'legend', 'enabled') !== false &&\n\t\t\tthis.model.getOptions().legend.enabled !== false;\n\n\t\t// Decide the position of the legend in reference to the chart\n\t\tconst fullFrameComponentDirection = LayoutDirection.COLUMN_REVERSE;\n\n\t\tconst legendSpacerComponent = {\n\t\t\tid: 'spacer',\n\t\t\tcomponents: [new Spacer(this.model, this.services, { size: 15 })],\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\tconst topLevelLayoutComponents = [];\n\t\t// header component is required for either title or toolbar\n\t\tif (titleAvailable || toolbarEnabled) {\n\t\t\ttopLevelLayoutComponents.push(headerComponent);\n\n\t\t\tconst titleSpacerComponent = {\n\t\t\t\tid: 'spacer',\n\t\t\t\tcomponents: [\n\t\t\t\t\tnew Spacer(\n\t\t\t\t\t\tthis.model,\n\t\t\t\t\t\tthis.services,\n\t\t\t\t\t\ttoolbarEnabled ? { size: 15 } : undefined\n\t\t\t\t\t),\n\t\t\t\t],\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 AxisChartsTooltip(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\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 Heatmap(this.model, this.services),\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(\n\t\t\tgraphFrameComponents\n\t\t);\n\t\treturn components;\n\t}\n}\n"]}
1
+ {"version":3,"file":"heatmap.js","sourceRoot":"","sources":["heatmap.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAElC,OAAO,EAEN,eAAe,EACf,YAAY,EAEZ,WAAW,EACX,gBAAgB,GAChB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACN,OAAO,EACP,kBAAkB,EAClB,KAAK,EACL,eAAe,EACf,gBAAgB,EAChB,KAAK,EACL,iBAAiB,EACjB,MAAM,EACN,OAAO,GAGP,MAAM,eAAe,CAAC;AAEvB;IAAkC,gCAAS;IAG1C,sBACC,MAAe,EACf,YAA8C;QAF/C,YAIC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAa3B;QAnBD,WAAK,GAAG,IAAI,YAAY,CAAC,KAAI,CAAC,QAAQ,CAAC,CAAC;QAQvC,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,6C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YACjD,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;SACtC,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CACpD,oBAAoB,CACpB,CAAC;QACF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,mBAAC;AAAD,CAAC,AAjKD,CAAkC,SAAS,GAiK1C","sourcesContent":["// Internal Imports\nimport { HeatmapModel } from '../model/heatmap';\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport * as Tools from '../tools';\n\nimport {\n\tHeatmapChartOptions,\n\tLayoutDirection,\n\tLayoutGrowth,\n\tChartConfig,\n\tRenderTypes,\n\tLayoutAlignItems,\n} from '../interfaces/index';\n\nimport {\n\tHeatmap,\n\tTwoDimensionalAxes,\n\tModal,\n\tLayoutComponent,\n\tColorScaleLegend,\n\tTitle,\n\tAxisChartsTooltip,\n\tSpacer,\n\tToolbar,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n} from '../components';\n\nexport class HeatmapChart extends AxisChart {\n\tmodel = new HeatmapModel(this.services);\n\n\tconstructor(\n\t\tholder: Element,\n\t\tchartConfigs: ChartConfig<HeatmapChartOptions>\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.heatmapChart,\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\t// Custom getChartComponents - Implements getChartComponents\n\t// Removes zoombar support and additional `features` that are not supported in heatmap\n\tprotected getAxisChartComponents(\n\t\tgraphFrameComponents: any[],\n\t\tconfigs?: any\n\t) {\n\t\tconst options = this.model.getOptions();\n\t\tconst toolbarEnabled = Tools.getProperty(options, 'toolbar', 'enabled');\n\n\t\tthis.services.cartesianScales.determineAxisDuality();\n\t\tthis.services.cartesianScales.findDomainAndRangeAxes(); // need to do this before getMainXAxisPosition()\n\t\tthis.services.cartesianScales.determineOrientation();\n\n\t\tconst titleAvailable = !!this.model.getOptions().title;\n\t\tconst titleComponent = {\n\t\t\tid: 'title',\n\t\t\tcomponents: [new Title(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.STRETCH,\n\t\t};\n\n\t\tconst toolbarComponent = {\n\t\t\tid: 'toolbar',\n\t\t\tcomponents: [new Toolbar(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t};\n\n\t\tconst headerComponent = {\n\t\t\tid: 'header',\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// always add title to keep layout correct\n\t\t\t\t\t\ttitleComponent,\n\t\t\t\t\t\t...(toolbarEnabled ? [toolbarComponent] : []),\n\t\t\t\t\t],\n\t\t\t\t\t{\n\t\t\t\t\t\tdirection: LayoutDirection.ROW,\n\t\t\t\t\t\talignItems: LayoutAlignItems.CENTER,\n\t\t\t\t\t}\n\t\t\t\t),\n\t\t\t],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t};\n\n\t\tconst legendComponent = {\n\t\t\tid: 'legend',\n\t\t\tcomponents: [new ColorScaleLegend(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t\trenderType: RenderTypes.SVG,\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: RenderTypes.SVG,\n\t\t};\n\n\t\tconst isLegendEnabled =\n\t\t\tTools.getProperty(configs, 'legend', 'enabled') !== false &&\n\t\t\tthis.model.getOptions().legend.enabled !== false;\n\n\t\t// Decide the position of the legend in reference to the chart\n\t\tconst fullFrameComponentDirection = LayoutDirection.COLUMN_REVERSE;\n\n\t\tconst legendSpacerComponent = {\n\t\t\tid: 'spacer',\n\t\t\tcomponents: [new Spacer(this.model, this.services, { size: 15 })],\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\tconst topLevelLayoutComponents = [];\n\t\t// header component is required for either title or toolbar\n\t\tif (titleAvailable || toolbarEnabled) {\n\t\t\ttopLevelLayoutComponents.push(headerComponent);\n\n\t\t\tconst titleSpacerComponent = {\n\t\t\t\tid: 'spacer',\n\t\t\t\tcomponents: [\n\t\t\t\t\tnew Spacer(\n\t\t\t\t\t\tthis.model,\n\t\t\t\t\t\tthis.services,\n\t\t\t\t\t\ttoolbarEnabled ? { size: 15 } : undefined\n\t\t\t\t\t),\n\t\t\t\t],\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 AxisChartsTooltip(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\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 Heatmap(this.model, this.services),\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(\n\t\t\tgraphFrameComponents\n\t\t);\n\t\treturn components;\n\t}\n}\n"]}
@@ -15,7 +15,7 @@ var __extends = (this && this.__extends) || (function () {
15
15
  import { ChartModelBinned } from '../model/binned-charts';
16
16
  import { AxisChart } from '../axis-chart';
17
17
  import * as Configuration from '../configuration';
18
- import { Tools } from '../tools';
18
+ import * as Tools from '../tools';
19
19
  // Components
20
20
  import { Grid, Histogram, BinnedRuler, TwoDimensionalAxes, } from '../components/index';
21
21
  var HistogramChart = /** @class */ (function (_super) {
@@ -1 +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,aAAa,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,aAAa;AACb,OAAO,EACN,IAAI,EACJ,SAAS,EACT,WAAW,EACX,kBAAkB,GAKlB,MAAM,qBAAqB,CAAC;AAE7B;IAAoC,kCAAS;IAG5C,wBACC,MAAe,EACf,YAAgD;QAFjD,YAIC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAe3B;QArBD,WAAK,GAAG,IAAI,gBAAgB,CAAC,KAAI,CAAC,QAAQ,CAAC,CAAC;QAQ3C,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;QAEhC,KAAI,CAAC,MAAM,EAAE,CAAC;;IACf,CAAC;IAED,sCAAa,GAAb;QACC,gDAAgD;QAChD,IAAM,oBAAoB,GAAG;YAC5B,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,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YAC1C,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;SACxC,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CACpD,oBAAoB,CACpB,CAAC;QAEF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,qBAAC;AAAD,CAAC,AAvCD,CAAoC,SAAS,GAuC5C","sourcesContent":["// Internal Imports\nimport { ChartModelBinned } from '../model/binned-charts';\nimport { AxisChart } 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} 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"]}
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,aAAa,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAElC,aAAa;AACb,OAAO,EACN,IAAI,EACJ,SAAS,EACT,WAAW,EACX,kBAAkB,GAKlB,MAAM,qBAAqB,CAAC;AAE7B;IAAoC,kCAAS;IAG5C,wBACC,MAAe,EACf,YAAgD;QAFjD,YAIC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAe3B;QArBD,WAAK,GAAG,IAAI,gBAAgB,CAAC,KAAI,CAAC,QAAQ,CAAC,CAAC;QAQ3C,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;QAEhC,KAAI,CAAC,MAAM,EAAE,CAAC;;IACf,CAAC;IAED,sCAAa,GAAb;QACC,gDAAgD;QAChD,IAAM,oBAAoB,GAAG;YAC5B,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,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YAC1C,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;SACxC,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CACpD,oBAAoB,CACpB,CAAC;QAEF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,qBAAC;AAAD,CAAC,AAvCD,CAAoC,SAAS,GAuC5C","sourcesContent":["// Internal Imports\nimport { ChartModelBinned } from '../model/binned-charts';\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, HistogramChartOptions } from '../interfaces/index';\nimport * as 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} 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/line.js CHANGED
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
14
14
  // Internal Imports
15
15
  import { AxisChart } from '../axis-chart';
16
16
  import * as Configuration from '../configuration';
17
- import { Tools } from '../tools';
17
+ import * as Tools from '../tools';
18
18
  // Components
19
19
  import { Grid, Line, Ruler, Scatter, TwoDimensionalAxes, ZeroLine, SkeletonLines, } from '../components/index';
20
20
  var LineChart = /** @class */ (function (_super) {