@carbon/charts 0.30.24 → 0.30.25

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 (162) hide show
  1. package/CHANGELOG.md +330 -1052
  2. package/README.md +3 -0
  3. package/axis-chart.js +8 -14
  4. package/axis-chart.js.map +1 -1
  5. package/build/demo/{data/create-codesandbox.d.ts → create-codesandbox.d.ts} +16 -13
  6. package/build/demo/data/bar.d.ts +1 -1
  7. package/build/demo/data/line.d.ts +1 -1
  8. package/build/src/interfaces/axis-scales.d.ts +11 -11
  9. package/build/src/interfaces/charts.d.ts +1 -0
  10. package/bundle.js +1 -1
  11. package/chart.js +15 -24
  12. package/chart.js.map +1 -1
  13. package/charts/bar-grouped.js +3 -1
  14. package/charts/bar-grouped.js.map +1 -1
  15. package/charts/bar-simple.js +3 -1
  16. package/charts/bar-simple.js.map +1 -1
  17. package/charts/bar-stacked.js +3 -1
  18. package/charts/bar-stacked.js.map +1 -1
  19. package/charts/bubble.js +3 -1
  20. package/charts/bubble.js.map +1 -1
  21. package/charts/donut.js +3 -1
  22. package/charts/donut.js.map +1 -1
  23. package/charts/line.js +3 -1
  24. package/charts/line.js.map +1 -1
  25. package/charts/pie.js +3 -1
  26. package/charts/pie.js.map +1 -1
  27. package/charts/radar.js +1 -3
  28. package/charts/radar.js.map +1 -1
  29. package/charts/scatter.js +3 -1
  30. package/charts/scatter.js.map +1 -1
  31. package/components/axes/axis.js +72 -33
  32. package/components/axes/axis.js.map +1 -1
  33. package/components/axes/grid.js +23 -18
  34. package/components/axes/grid.js.map +1 -1
  35. package/components/axes/ruler.js +7 -5
  36. package/components/axes/ruler.js.map +1 -1
  37. package/components/axes/two-dimensional-axes.js +5 -2
  38. package/components/axes/two-dimensional-axes.js.map +1 -1
  39. package/components/axes/zero-line.js +2 -1
  40. package/components/axes/zero-line.js.map +1 -1
  41. package/components/component.js +2 -4
  42. package/components/component.js.map +1 -1
  43. package/components/essentials/legend.js +46 -23
  44. package/components/essentials/legend.js.map +1 -1
  45. package/components/essentials/threshold.js +11 -5
  46. package/components/essentials/threshold.js.map +1 -1
  47. package/components/essentials/title.js +6 -4
  48. package/components/essentials/title.js.map +1 -1
  49. package/components/essentials/tooltip-bar.js +39 -20
  50. package/components/essentials/tooltip-bar.js.map +1 -1
  51. package/components/essentials/tooltip-pie.js +4 -3
  52. package/components/essentials/tooltip-pie.js.map +1 -1
  53. package/components/essentials/tooltip-radar.js +6 -3
  54. package/components/essentials/tooltip-radar.js.map +1 -1
  55. package/components/essentials/tooltip-scatter.js +3 -1
  56. package/components/essentials/tooltip-scatter.js.map +1 -1
  57. package/components/essentials/tooltip.js +35 -15
  58. package/components/essentials/tooltip.js.map +1 -1
  59. package/components/graphs/bar-grouped.js +46 -20
  60. package/components/graphs/bar-grouped.js.map +1 -1
  61. package/components/graphs/bar-simple.js +39 -19
  62. package/components/graphs/bar-simple.js.map +1 -1
  63. package/components/graphs/bar-stacked.js +50 -28
  64. package/components/graphs/bar-stacked.js.map +1 -1
  65. package/components/graphs/bar.js.map +1 -1
  66. package/components/graphs/bubble.js +22 -8
  67. package/components/graphs/bubble.js.map +1 -1
  68. package/components/graphs/donut.js +12 -4
  69. package/components/graphs/donut.js.map +1 -1
  70. package/components/graphs/line.js +14 -7
  71. package/components/graphs/line.js.map +1 -1
  72. package/components/graphs/pie.js +80 -44
  73. package/components/graphs/pie.js.map +1 -1
  74. package/components/graphs/radar.js +271 -140
  75. package/components/graphs/radar.js.map +1 -1
  76. package/components/graphs/scatter.js +54 -21
  77. package/components/graphs/scatter.js.map +1 -1
  78. package/components/graphs/skeleton.js +29 -14
  79. package/components/graphs/skeleton.js.map +1 -1
  80. package/components/layout/layout.js +38 -26
  81. package/components/layout/layout.js.map +1 -1
  82. package/components/layout/spacer.js +2 -1
  83. package/components/layout/spacer.js.map +1 -1
  84. package/configuration.js +15 -13
  85. package/configuration.js.map +1 -1
  86. package/demo/{data/create-codesandbox.d.ts → create-codesandbox.d.ts} +16 -13
  87. package/demo/{data/create-codesandbox.js → create-codesandbox.js} +24 -21
  88. package/demo/create-codesandbox.js.map +1 -0
  89. package/demo/data/bar.d.ts +1 -1
  90. package/demo/data/bar.js +1 -1
  91. package/demo/data/bar.js.map +1 -1
  92. package/demo/data/bubble.js +5 -3
  93. package/demo/data/bubble.js.map +1 -1
  94. package/demo/data/bundle.js +1 -1
  95. package/demo/data/index.js +12 -7
  96. package/demo/data/index.js.map +1 -1
  97. package/demo/data/line.d.ts +1 -1
  98. package/demo/data/line.js +2 -4
  99. package/demo/data/line.js.map +1 -1
  100. package/demo/data/radar.js.map +1 -1
  101. package/demo/data/time-series-axis.js +1 -3
  102. package/demo/data/time-series-axis.js.map +1 -1
  103. package/demo/styles.css +50 -18
  104. package/demo/styles.css.map +1 -1
  105. package/demo/styles.min.css +1 -1
  106. package/demo/styles.min.css.map +1 -1
  107. package/demo/tsconfig.tsbuildinfo +68 -68
  108. package/index.js.map +1 -1
  109. package/interfaces/axis-scales.d.ts +11 -11
  110. package/interfaces/axis-scales.js.map +1 -1
  111. package/interfaces/charts.d.ts +1 -0
  112. package/interfaces/charts.js.map +1 -1
  113. package/interfaces/components.js.map +1 -1
  114. package/interfaces/enums.js.map +1 -1
  115. package/model.js +27 -16
  116. package/model.js.map +1 -1
  117. package/package.json +4 -2
  118. package/polyfills.js +7 -2
  119. package/polyfills.js.map +1 -1
  120. package/services/angle-utils.js +34 -9
  121. package/services/angle-utils.js.map +1 -1
  122. package/services/colors.js.map +1 -1
  123. package/services/curves.js +4 -2
  124. package/services/curves.js.map +1 -1
  125. package/services/essentials/dom-utils.js +4 -3
  126. package/services/essentials/dom-utils.js.map +1 -1
  127. package/services/essentials/transitions.js +3 -4
  128. package/services/essentials/transitions.js.map +1 -1
  129. package/services/scales-cartesian.js +63 -23
  130. package/services/scales-cartesian.js.map +1 -1
  131. package/services/time-series.js +28 -12
  132. package/services/time-series.js.map +1 -1
  133. package/styles/components/_axis.scss +4 -0
  134. package/styles/components/_layout.scss +0 -1
  135. package/styles/components/_ruler.scss +5 -2
  136. package/styles/components/_skeleton.scss +2 -3
  137. package/styles/components/_threshold.scss +2 -2
  138. package/styles/components/_tooltip.scss +6 -5
  139. package/styles/graphs/_bubble.scss +1 -1
  140. package/styles/graphs/_radar.scss +4 -2
  141. package/styles/graphs/_scatter.scss +1 -1
  142. package/styles/mixins.scss +2 -2
  143. package/styles-g10.css +11 -4
  144. package/styles-g10.css.map +1 -1
  145. package/styles-g10.min.css +1 -1
  146. package/styles-g10.min.css.map +1 -1
  147. package/styles-g100.css +11 -4
  148. package/styles-g100.css.map +1 -1
  149. package/styles-g100.min.css +1 -1
  150. package/styles-g100.min.css.map +1 -1
  151. package/styles-g90.css +11 -4
  152. package/styles-g90.css.map +1 -1
  153. package/styles-g90.min.css +1 -1
  154. package/styles-g90.min.css.map +1 -1
  155. package/styles.css +11 -4
  156. package/styles.css.map +1 -1
  157. package/styles.min.css +1 -1
  158. package/styles.min.css.map +1 -1
  159. package/tools.js +19 -7
  160. package/tools.js.map +1 -1
  161. package/tsconfig.tsbuildinfo +56 -56
  162. package/demo/data/create-codesandbox.js.map +0 -1
package/chart.js CHANGED
@@ -33,15 +33,13 @@ var Chart = /** @class */ (function () {
33
33
  _this.services[serviceName] = new serviceObj(_this.model, _this.services);
34
34
  });
35
35
  // Call update() when model has been updated
36
- this.services.events
37
- .addEventListener(ChartEvents.Model.UPDATE, function () {
36
+ this.services.events.addEventListener(ChartEvents.Model.UPDATE, function () {
38
37
  _this.update(true);
39
38
  });
40
39
  // Set model data & options
41
40
  this.model.setData(chartConfigs.data);
42
41
  // Set chart resize event listener
43
- this.services.events
44
- .addEventListener(ChartEvents.Chart.RESIZE, function () {
42
+ this.services.events.addEventListener(ChartEvents.Chart.RESIZE, function () {
45
43
  _this.update(false);
46
44
  });
47
45
  this.components = this.getComponents();
@@ -69,14 +67,13 @@ var Chart = /** @class */ (function () {
69
67
  // Since at the start of the transition
70
68
  // Elements do not hold their final size or position
71
69
  var pendingTransitions = this.services.transitions.getPendingTransitions();
72
- var promises = Object.keys(pendingTransitions)
73
- .map(function (transitionID) {
70
+ var promises = Object.keys(pendingTransitions).map(function (transitionID) {
74
71
  var transition = pendingTransitions[transitionID];
75
- return transition.end()
76
- .catch(function (e) { return e; }); // Skip rejects since we don't care about those;
72
+ return transition.end().catch(function (e) { return e; }); // Skip rejects since we don't care about those;
73
+ });
74
+ Promise.all(promises).then(function () {
75
+ return _this.services.events.dispatchEvent(ChartEvents.Chart.RENDER_FINISHED);
77
76
  });
78
- Promise.all(promises)
79
- .then(function () { return _this.services.events.dispatchEvent(ChartEvents.Chart.RENDER_FINISHED); });
80
77
  };
81
78
  Chart.prototype.destroy = function () {
82
79
  // Call the destroy() method on all components
@@ -88,9 +85,7 @@ var Chart = /** @class */ (function () {
88
85
  Chart.prototype.getChartComponents = function (graphFrameComponents) {
89
86
  var titleComponent = {
90
87
  id: "title",
91
- components: [
92
- new Title(this.model, this.services)
93
- ],
88
+ components: [new Title(this.model, this.services)],
94
89
  growth: {
95
90
  x: LayoutGrowth.PREFERRED,
96
91
  y: LayoutGrowth.FIXED
@@ -98,9 +93,7 @@ var Chart = /** @class */ (function () {
98
93
  };
99
94
  var legendComponent = {
100
95
  id: "legend",
101
- components: [
102
- new Legend(this.model, this.services)
103
- ],
96
+ components: [new Legend(this.model, this.services)],
104
97
  growth: {
105
98
  x: LayoutGrowth.PREFERRED,
106
99
  y: LayoutGrowth.FIXED
@@ -123,13 +116,15 @@ var Chart = /** @class */ (function () {
123
116
  if (legendPosition === "left") {
124
117
  fullFrameComponentDirection = LayoutDirection.ROW;
125
118
  if (!this.model.getOptions().legend.orientation) {
126
- this.model.getOptions().legend.orientation = LegendOrientations.VERTICAL;
119
+ this.model.getOptions().legend.orientation =
120
+ LegendOrientations.VERTICAL;
127
121
  }
128
122
  }
129
123
  else if (legendPosition === "right") {
130
124
  fullFrameComponentDirection = LayoutDirection.ROW_REVERSE;
131
125
  if (!this.model.getOptions().legend.orientation) {
132
- this.model.getOptions().legend.orientation = LegendOrientations.VERTICAL;
126
+ this.model.getOptions().legend.orientation =
127
+ LegendOrientations.VERTICAL;
133
128
  }
134
129
  }
135
130
  else if (legendPosition === "bottom") {
@@ -138,9 +133,7 @@ var Chart = /** @class */ (function () {
138
133
  }
139
134
  var legendSpacerComponent = {
140
135
  id: "spacer",
141
- components: [
142
- new Spacer(this.model, this.services)
143
- ],
136
+ components: [new Spacer(this.model, this.services)],
144
137
  growth: {
145
138
  x: LayoutGrowth.PREFERRED,
146
139
  y: LayoutGrowth.FIXED
@@ -167,9 +160,7 @@ var Chart = /** @class */ (function () {
167
160
  topLevelLayoutComponents.push(titleComponent);
168
161
  var titleSpacerComponent = {
169
162
  id: "spacer",
170
- components: [
171
- new Spacer(this.model, this.services)
172
- ],
163
+ components: [new Spacer(this.model, this.services)],
173
164
  growth: {
174
165
  x: LayoutGrowth.PREFERRED,
175
166
  y: LayoutGrowth.FIXED
package/chart.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"chart.js","sourceRoot":"","sources":["chart.ts"],"names":[],"mappings":";;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAGN,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,MAAM,IAAI,WAAW,EACrB,MAAM,cAAc,CAAC;AAEtB,OAAO;AACP,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EACN,KAAK,EACL,MAAM,EACN,eAAe,EAEf,MAAM,EACN,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,WAAW;AACX,OAAO,EACN,QAAQ,EACR,MAAM,EACN,WAAW,EACX,MAAM,kBAAkB,CAAC;AAE1B;IASC,eAAY,MAAe,EAAE,YAA2C;QAPxE,aAAQ,GAAQ;YACf,QAAQ,EAAE,QAAQ;YAClB,MAAM,EAAE,MAAM;YACd,WAAW,EAAE,WAAW;SACxB,CAAC;QACF,UAAK,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,CAAC;oBAChD,qBAAqB;oBACrB,mBAAmB;oBAEpB;oBACC,SAAS,EAAE,2BAA2B;iBACtC,CACD;aACD;YACD,MAAM,EAAE;gBACP,CAAC,EAAE,YAAY,CAAC,OAAO;gBACvB,CAAC,EAAE,YAAY,CAAC,KAAK;aACrB;SACD,CAAC;QAEF,+BAA+B;QAC/B,IAAM,wBAAwB,GAAG,EAAE,CAAC;QACpC,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE;YAClC,wBAAwB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YAE9C,IAAM,oBAAoB,GAAG;gBAC5B,EAAE,EAAE,QAAQ;gBACZ,UAAU,EAAE;oBACX,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;iBACrC;gBACD,MAAM,EAAE;oBACP,CAAC,EAAE,YAAY,CAAC,SAAS;oBACzB,CAAC,EAAE,YAAY,CAAC,KAAK;iBACrB;aACD,CAAC;YAEF,wBAAwB,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;SACpD;QACD,wBAAwB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAElD,OAAO;YACN,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,AAlND,IAkNC","sourcesContent":["// Internal Imports\nimport {\n\tChartConfig,\n\tBaseChartOptions,\n\tLayoutGrowth,\n\tLayoutDirection,\n\tLegendOrientations,\n\tEvents as ChartEvents\n} from \"./interfaces\";\n\n// Misc\nimport { ChartModel } from \"./model\";\nimport { Component,\n\tTitle,\n\tLegend,\n\tLayoutComponent,\n\tTooltip,\n\tSpacer\n} from \"./components\";\nimport { Tools } from \"./tools\";\n\n// Services\nimport {\n\tDOMUtils,\n\tEvents,\n\tTransitions\n} from \"./services/index\";\n\nexport class Chart {\n\tcomponents: Component[];\n\tservices: any = {\n\t\tdomUtils: DOMUtils,\n\t\tevents: Events,\n\t\ttransitions: Transitions\n\t};\n\tmodel: ChartModel = new ChartModel(this.services);\n\n\tconstructor(holder: Element, chartConfigs: ChartConfig<BaseChartOptions>) {}\n\n\t// Contains the code that uses properties that are overridable by the super-class\n\tinit(holder: Element, chartConfigs: ChartConfig<BaseChartOptions>) {\n\t\t// Store the holder in the model\n\t\tthis.model.set({ holder }, 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(this.model, this.services);\n\t\t});\n\n\t\t// Call update() when model has been updated\n\t\tthis.services.events\n\t\t\t.addEventListener(ChartEvents.Model.UPDATE, () => {\n\t\t\t\tthis.update(true);\n\t\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\n\t\t\t.addEventListener(ChartEvents.Chart.RESIZE, () => {\n\t\t\t\tthis.update(false);\n\t\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\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)\n\t\t\t.map(transitionID => {\n\t\t\t\tconst transition = pendingTransitions[transitionID];\n\t\t\t\treturn transition.end()\n\t\t\t\t\t.catch(e => e); // Skip rejects since we don't care about those;\n\t\t\t});\n\n\t\tPromise.all(promises)\n\t\t\t.then(() => this.services.events.dispatchEvent(ChartEvents.Chart.RENDER_FINISHED));\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 }, true);\n\t}\n\n\n\tprotected getChartComponents(graphFrameComponents: any[]) {\n\t\tconst titleComponent = {\n\t\t\tid: \"title\",\n\t\t\tcomponents: [\n\t\t\t\tnew Title(this.model, this.services)\n\t\t\t],\n\t\t\tgrowth: {\n\t\t\t\tx: LayoutGrowth.PREFERRED,\n\t\t\t\ty: LayoutGrowth.FIXED\n\t\t\t}\n\t\t};\n\n\t\tconst legendComponent = {\n\t\t\tid: \"legend\",\n\t\t\tcomponents: [\n\t\t\t\tnew Legend(this.model, this.services)\n\t\t\t],\n\t\t\tgrowth: {\n\t\t\t\tx: LayoutGrowth.PREFERRED,\n\t\t\t\ty: LayoutGrowth.FIXED\n\t\t\t}\n\t\t};\n\n\t\tconst graphFrameComponent = {\n\t\t\tid: \"graph-frame\",\n\t\t\tcomponents: graphFrameComponents,\n\t\t\tgrowth: {\n\t\t\t\tx: LayoutGrowth.STRETCH,\n\t\t\t\ty: LayoutGrowth.FIXED\n\t\t\t}\n\t\t};\n\n\t\tconst isLegendEnabled = this.model.getOptions().legend.enabled !== false;\n\t\t// TODORF - REUSE BETWEEN AXISCHART & CHART\n\t\t// Decide the position of the legend in reference to the chart\n\t\tlet fullFrameComponentDirection = LayoutDirection.COLUMN;\n\t\tif (isLegendEnabled) {\n\t\t\t\tconst legendPosition = Tools.getProperty(this.model.getOptions(), \"legend\", \"position\");\n\t\t\tif (legendPosition === \"left\") {\n\t\t\t\tfullFrameComponentDirection = LayoutDirection.ROW;\n\n\t\t\t\tif (!this.model.getOptions().legend.orientation) {\n\t\t\t\t\tthis.model.getOptions().legend.orientation = 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 (!this.model.getOptions().legend.orientation) {\n\t\t\t\t\tthis.model.getOptions().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: [\n\t\t\t\tnew Spacer(this.model, this.services)\n\t\t\t],\n\t\t\tgrowth: {\n\t\t\t\tx: LayoutGrowth.PREFERRED,\n\t\t\t\ty: LayoutGrowth.FIXED\n\t\t\t}\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\tlegendSpacerComponent,\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: {\n\t\t\t\tx: LayoutGrowth.STRETCH,\n\t\t\t\ty: LayoutGrowth.FIXED\n\t\t\t}\n\t\t};\n\n\t\t// Add chart title if it exists\n\t\tconst topLevelLayoutComponents = [];\n\t\tif (this.model.getOptions().title) {\n\t\t\ttopLevelLayoutComponents.push(titleComponent);\n\n\t\t\tconst titleSpacerComponent = {\n\t\t\t\tid: \"spacer\",\n\t\t\t\tcomponents: [\n\t\t\t\t\tnew Spacer(this.model, this.services)\n\t\t\t\t],\n\t\t\t\tgrowth: {\n\t\t\t\t\tx: LayoutGrowth.PREFERRED,\n\t\t\t\t\ty: LayoutGrowth.FIXED\n\t\t\t\t}\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 LayoutComponent(\n\t\t\t\tthis.model,\n\t\t\t\tthis.services,\n\t\t\t\ttopLevelLayoutComponents,\n\t\t\t\t{\n\t\t\t\t\tdirection: LayoutDirection.COLUMN\n\t\t\t\t}\n\t\t\t)\n\t\t];\n\t}\n}\n"]}
1
+ {"version":3,"file":"chart.js","sourceRoot":"","sources":["chart.ts"],"names":[],"mappings":";;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAGN,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,MAAM,IAAI,WAAW,EACrB,MAAM,cAAc,CAAC;AAEtB,OAAO;AACP,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAEN,KAAK,EACL,MAAM,EACN,eAAe,EAEf,MAAM,EACN,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,WAAW;AACX,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEjE;IASC,eAAY,MAAe,EAAE,YAA2C;QAPxE,aAAQ,GAAQ;YACf,QAAQ,EAAE,QAAQ;YAClB,MAAM,EAAE,MAAM;YACd,WAAW,EAAE,WAAW;SACxB,CAAC;QACF,UAAK,GAAe,IAAI,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAEyB,CAAC;IAE5E,iFAAiF;IACjF,oBAAI,GAAJ,UAAK,MAAe,EAAE,YAA2C;QAAjE,iBA6BC;QA5BA,gCAAgC;QAChC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C,KAAK;aACrB;SACD,CAAC;QAEF,+BAA+B;QAC/B,IAAM,wBAAwB,GAAG,EAAE,CAAC;QACpC,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE;YAClC,wBAAwB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YAE9C,IAAM,oBAAoB,GAAG;gBAC5B,EAAE,EAAE,QAAQ;gBACZ,UAAU,EAAE,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACnD,MAAM,EAAE;oBACP,CAAC,EAAE,YAAY,CAAC,SAAS;oBACzB,CAAC,EAAE,YAAY,CAAC,KAAK;iBACrB;aACD,CAAC;YAEF,wBAAwB,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;SACpD;QACD,wBAAwB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAElD,OAAO;YACN,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,AAhND,IAgNC","sourcesContent":["// Internal Imports\nimport {\n\tChartConfig,\n\tBaseChartOptions,\n\tLayoutGrowth,\n\tLayoutDirection,\n\tLegendOrientations,\n\tEvents as ChartEvents\n} from \"./interfaces\";\n\n// Misc\nimport { ChartModel } from \"./model\";\nimport {\n\tComponent,\n\tTitle,\n\tLegend,\n\tLayoutComponent,\n\tTooltip,\n\tSpacer\n} from \"./components\";\nimport { Tools } from \"./tools\";\n\n// Services\nimport { DOMUtils, Events, Transitions } from \"./services/index\";\n\nexport class Chart {\n\tcomponents: Component[];\n\tservices: any = {\n\t\tdomUtils: DOMUtils,\n\t\tevents: Events,\n\t\ttransitions: Transitions\n\t};\n\tmodel: ChartModel = new ChartModel(this.services);\n\n\tconstructor(holder: Element, chartConfigs: ChartConfig<BaseChartOptions>) {}\n\n\t// Contains the code that uses properties that are overridable by the super-class\n\tinit(holder: Element, chartConfigs: ChartConfig<BaseChartOptions>) {\n\t\t// Store the holder in the model\n\t\tthis.model.set({ holder }, 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, () => {\n\t\t\tthis.update(true);\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 }, true);\n\t}\n\n\tprotected getChartComponents(graphFrameComponents: any[]) {\n\t\tconst titleComponent = {\n\t\t\tid: \"title\",\n\t\t\tcomponents: [new Title(this.model, this.services)],\n\t\t\tgrowth: {\n\t\t\t\tx: LayoutGrowth.PREFERRED,\n\t\t\t\ty: LayoutGrowth.FIXED\n\t\t\t}\n\t\t};\n\n\t\tconst legendComponent = {\n\t\t\tid: \"legend\",\n\t\t\tcomponents: [new Legend(this.model, this.services)],\n\t\t\tgrowth: {\n\t\t\t\tx: LayoutGrowth.PREFERRED,\n\t\t\t\ty: LayoutGrowth.FIXED\n\t\t\t}\n\t\t};\n\n\t\tconst graphFrameComponent = {\n\t\t\tid: \"graph-frame\",\n\t\t\tcomponents: graphFrameComponents,\n\t\t\tgrowth: {\n\t\t\t\tx: LayoutGrowth.STRETCH,\n\t\t\t\ty: LayoutGrowth.FIXED\n\t\t\t}\n\t\t};\n\n\t\tconst isLegendEnabled =\n\t\t\tthis.model.getOptions().legend.enabled !== false;\n\t\t// TODORF - REUSE BETWEEN AXISCHART & CHART\n\t\t// Decide the position of the legend in reference to the chart\n\t\tlet fullFrameComponentDirection = LayoutDirection.COLUMN;\n\t\tif (isLegendEnabled) {\n\t\t\tconst legendPosition = Tools.getProperty(\n\t\t\t\tthis.model.getOptions(),\n\t\t\t\t\"legend\",\n\t\t\t\t\"position\"\n\t\t\t);\n\t\t\tif (legendPosition === \"left\") {\n\t\t\t\tfullFrameComponentDirection = LayoutDirection.ROW;\n\n\t\t\t\tif (!this.model.getOptions().legend.orientation) {\n\t\t\t\t\tthis.model.getOptions().legend.orientation =\n\t\t\t\t\t\tLegendOrientations.VERTICAL;\n\t\t\t\t}\n\t\t\t} else if (legendPosition === \"right\") {\n\t\t\t\tfullFrameComponentDirection = LayoutDirection.ROW_REVERSE;\n\n\t\t\t\tif (!this.model.getOptions().legend.orientation) {\n\t\t\t\t\tthis.model.getOptions().legend.orientation =\n\t\t\t\t\t\tLegendOrientations.VERTICAL;\n\t\t\t\t}\n\t\t\t} else if (legendPosition === \"bottom\") {\n\t\t\t\tfullFrameComponentDirection = LayoutDirection.COLUMN_REVERSE;\n\t\t\t}\n\t\t}\n\n\t\tconst legendSpacerComponent = {\n\t\t\tid: \"spacer\",\n\t\t\tcomponents: [new Spacer(this.model, this.services)],\n\t\t\tgrowth: {\n\t\t\t\tx: LayoutGrowth.PREFERRED,\n\t\t\t\ty: LayoutGrowth.FIXED\n\t\t\t}\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\tlegendSpacerComponent,\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: {\n\t\t\t\tx: LayoutGrowth.STRETCH,\n\t\t\t\ty: LayoutGrowth.FIXED\n\t\t\t}\n\t\t};\n\n\t\t// Add chart title if it exists\n\t\tconst topLevelLayoutComponents = [];\n\t\tif (this.model.getOptions().title) {\n\t\t\ttopLevelLayoutComponents.push(titleComponent);\n\n\t\t\tconst titleSpacerComponent = {\n\t\t\t\tid: \"spacer\",\n\t\t\t\tcomponents: [new Spacer(this.model, this.services)],\n\t\t\t\tgrowth: {\n\t\t\t\t\tx: LayoutGrowth.PREFERRED,\n\t\t\t\t\ty: LayoutGrowth.FIXED\n\t\t\t\t}\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 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"]}
@@ -36,7 +36,9 @@ var GroupedBarChart = /** @class */ (function (_super) {
36
36
  new Grid(this.model, this.services),
37
37
  new GroupedBar(this.model, this.services),
38
38
  new ZeroLine(this.model, this.services),
39
- new Skeleton(this.model, this.services, { skeleton: Skeletons.VERT_OR_HORIZ })
39
+ new Skeleton(this.model, this.services, {
40
+ skeleton: Skeletons.VERT_OR_HORIZ
41
+ })
40
42
  ];
41
43
  var components = this.getAxisChartComponents(graphFrameComponents);
42
44
  components.push(new TooltipBar(this.model, this.services));
@@ -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;AAKlD,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,EACR,UAAU,EAKV,QAAQ,EACR,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,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,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,EAAE,QAAQ,EAAE,SAAS,CAAC,aAAa,EAAE,CAAC;SAC9E,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CAAC,oBAAoB,CAAC,CAAC;QAC5E,UAAU,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC3D,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,sBAAC;AAAD,CAAC,AA/BD,CAAqC,SAAS,GA+B7C","sourcesContent":["// Internal Imports\nimport { AxisChart } from \"../axis-chart\";\nimport * as Configuration from \"../configuration\";\nimport {\n\tBarChartOptions,\n\tChartConfig\n} 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\tTooltipBar,\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 = [\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, { skeleton: Skeletons.VERT_OR_HORIZ })\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(graphFrameComponents);\n\t\tcomponents.push(new TooltipBar(this.model, this.services));\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,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,EACR,UAAU,EAKV,QAAQ,EACR,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,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,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,UAAU,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC3D,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 { 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\tTooltipBar,\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 = [\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\tcomponents.push(new TooltipBar(this.model, this.services));\n\t\treturn components;\n\t}\n}\n"]}
@@ -36,7 +36,9 @@ var SimpleBarChart = /** @class */ (function (_super) {
36
36
  new Grid(this.model, this.services),
37
37
  new SimpleBar(this.model, this.services),
38
38
  new ZeroLine(this.model, this.services),
39
- new Skeleton(this.model, this.services, { skeleton: Skeletons.VERT_OR_HORIZ })
39
+ new Skeleton(this.model, this.services, {
40
+ skeleton: Skeletons.VERT_OR_HORIZ
41
+ })
40
42
  ];
41
43
  var components = this.getAxisChartComponents(graphFrameComponents);
42
44
  components.push(new TooltipBar(this.model, this.services));
@@ -1 +1 @@
1
- {"version":3,"file":"bar-simple.js","sourceRoot":"","sources":["bar-simple.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAA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AAoB,CAAC,CAAC;QAC5E,UAAU,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC3D,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,qBAAC;AAAD,CAAC,AA/BD,CAAoC,SAAS,GA+B5C","sourcesContent":["// Internal Imports\nimport { AxisChart } from \"../axis-chart\";\nimport * as Configuration from \"../configuration\";\nimport {\n\tBarChartOptions,\n\tChartConfig\n} 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\tTooltipBar,\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 = [\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, { skeleton: Skeletons.VERT_OR_HORIZ })\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(graphFrameComponents);\n\t\tcomponents.push(new TooltipBar(this.model, this.services));\n\t\treturn components;\n\t}\n}\n"]}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AS,CAAC,aAAa;aACjC,CAAC;SACF,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CACpD,oBAAoB,CACpB,CAAC;QACF,UAAU,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC3D,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,qBAAC;AAAD,CAAC,AAnCD,CAAoC,SAAS,GAmC5C","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\tTooltipBar,\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 = [\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\tcomponents.push(new TooltipBar(this.model, this.services));\n\t\treturn components;\n\t}\n}\n"]}
@@ -35,7 +35,9 @@ var StackedBarChart = /** @class */ (function (_super) {
35
35
  new TwoDimensionalAxes(this.model, this.services),
36
36
  new Grid(this.model, this.services),
37
37
  new StackedBar(this.model, this.services),
38
- new Skeleton(this.model, this.services, { skeleton: Skeletons.VERT_OR_HORIZ })
38
+ new Skeleton(this.model, this.services, {
39
+ skeleton: Skeletons.VERT_OR_HORIZ
40
+ })
39
41
  ];
40
42
  var components = this.getAxisChartComponents(graphFrameComponents);
41
43
  components.push(new TooltipBar(this.model, this.services));
@@ -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;AAKlD,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,EAKlB,UAAU,EACV,QAAQ,EACR,MAAM,qBAAqB,CAAC;AAE7B;IAAqC,mCAAS;IAC7C,yBAAY,MAAe,EAAE,YAA8C;QAA3E,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,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,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACzC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,SAAS,CAAC,aAAa,EAAE,CAAC;SAC9E,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CAAC,oBAAoB,CAAC,CAAC;QAC5E,UAAU,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC3D,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,sBAAC;AAAD,CAAC,AA9BD,CAAqC,SAAS,GA8B7C","sourcesContent":["// Internal Imports\nimport { AxisChart } from \"../axis-chart\";\nimport * as Configuration from \"../configuration\";\nimport {\n\tChartConfig,\n\tScatterChartOptions\n} from \"../interfaces/index\";\nimport { Tools } from \"../tools\";\nimport { Skeletons } from \"../interfaces/enums\";\n\n// Components\nimport {\n\tGrid,\n\tStackedBar,\n\tTwoDimensionalAxes,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n\tTooltipBar,\n\tSkeleton\n} from \"../components/index\";\n\nexport class StackedBarChart extends AxisChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<ScatterChartOptions>) {\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 = [\n\t\t\tnew TwoDimensionalAxes(this.model, this.services),\n\t\t\tnew Grid(this.model, this.services),\n\t\t\tnew StackedBar(this.model, this.services),\n\t\t\tnew Skeleton(this.model, this.services, { skeleton: Skeletons.VERT_OR_HORIZ })\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(graphFrameComponents);\n\t\tcomponents.push(new TooltipBar(this.model, this.services));\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,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,aAAa;AACb,OAAO,EACN,IAAI,EACJ,UAAU,EACV,kBAAkB,EAKlB,UAAU,EACV,QAAQ,EACR,MAAM,qBAAqB,CAAC;AAE7B;IAAqC,mCAAS;IAC7C,yBACC,MAAe,EACf,YAA8C;QAF/C,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,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,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,EAAE;gBACvC,QAAQ,EAAE,SAAS,CAAC,aAAa;aACjC,CAAC;SACF,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CACpD,oBAAoB,CACpB,CAAC;QACF,UAAU,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC3D,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,sBAAC;AAAD,CAAC,AArCD,CAAqC,SAAS,GAqC7C","sourcesContent":["// Internal Imports\nimport { AxisChart } from \"../axis-chart\";\nimport * as Configuration from \"../configuration\";\nimport { ChartConfig, ScatterChartOptions } from \"../interfaces/index\";\nimport { Tools } from \"../tools\";\nimport { Skeletons } from \"../interfaces/enums\";\n\n// Components\nimport {\n\tGrid,\n\tStackedBar,\n\tTwoDimensionalAxes,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n\tTooltipBar,\n\tSkeleton\n} from \"../components/index\";\n\nexport class StackedBarChart extends AxisChart {\n\tconstructor(\n\t\tholder: Element,\n\t\tchartConfigs: ChartConfig<ScatterChartOptions>\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.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 = [\n\t\t\tnew TwoDimensionalAxes(this.model, this.services),\n\t\t\tnew Grid(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];\n\n\t\tconst components: any[] = this.getAxisChartComponents(\n\t\t\tgraphFrameComponents\n\t\t);\n\t\tcomponents.push(new TooltipBar(this.model, this.services));\n\t\treturn components;\n\t}\n}\n"]}
package/charts/bubble.js CHANGED
@@ -36,7 +36,9 @@ var BubbleChart = /** @class */ (function (_super) {
36
36
  new Grid(this.model, this.services),
37
37
  new Ruler(this.model, this.services),
38
38
  new Bubble(this.model, this.services),
39
- new Skeleton(this.model, this.services, { skeleton: Skeletons.GRID })
39
+ new Skeleton(this.model, this.services, {
40
+ skeleton: Skeletons.GRID
41
+ })
40
42
  ];
41
43
  var components = this.getAxisChartComponents(graphFrameComponents);
42
44
  components.push(new TooltipScatter(this.model, this.services));
@@ -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;AAKlD,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,cAAc,EACd,QAAQ,EACR,MAAM,qBAAqB,CAAC;AAE7B;IAAiC,+BAAS;IACzC,qBAAY,MAAe,EAAE,YAA6C;QAA1E,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,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,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,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,EAAE,QAAQ,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC;SACrE,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CAAC,oBAAoB,CAAC,CAAC;QAC5E,UAAU,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC/D,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,kBAAC;AAAD,CAAC,AA/BD,CAAiC,SAAS,GA+BzC","sourcesContent":["// Internal Imports\nimport { AxisChart } from \"../axis-chart\";\nimport * as Configuration from \"../configuration\";\nimport {\n\tChartConfig,\n\tBubbleChartOptions\n} 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\tTooltipScatter,\n\tSkeleton\n} from \"../components/index\";\n\nexport class BubbleChart extends AxisChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<BubbleChartOptions>) {\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 = [\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, { skeleton: Skeletons.GRID })\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(graphFrameComponents);\n\t\tcomponents.push(new TooltipScatter(this.model, this.services));\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,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,cAAc,EACd,QAAQ,EACR,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,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,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,UAAU,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC/D,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,kBAAC;AAAD,CAAC,AAtCD,CAAiC,SAAS,GAsCzC","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\tTooltipScatter,\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 = [\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\tcomponents.push(new TooltipScatter(this.model, this.services));\n\t\treturn components;\n\t}\n}\n"]}
package/charts/donut.js CHANGED
@@ -33,7 +33,9 @@ var DonutChart = /** @class */ (function (_super) {
33
33
  // Specify what to render inside the graph-frame
34
34
  var graphFrameComponents = [
35
35
  new Donut(this.model, this.services),
36
- new Skeleton(this.model, this.services, { skeleton: Skeletons.DONUT })
36
+ new Skeleton(this.model, this.services, {
37
+ skeleton: Skeletons.DONUT
38
+ })
37
39
  ];
38
40
  var components = this.getChartComponents(graphFrameComponents);
39
41
  components.push(new TooltipPie(this.model,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AAC;IACnB,CAAC;IACF,iBAAC;AAAD,CAAC,AA5BD,CAAgC,QAAQ,GA4BvC","sourcesContent":["// Internal Imports\nimport { PieChart } from \"./pie\";\nimport * as Configuration from \"../configuration\";\nimport {\n\tChartConfig,\n\tPieChartOptions\n} 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\tTooltipPie\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 = [\n\t\t\tnew Donut(this.model, this.services),\n\t\t\tnew Skeleton(this.model, this.services, { skeleton: Skeletons.DONUT })\n\t\t];\n\n\t\tconst components: any[] = this.getChartComponents(graphFrameComponents);\n\t\tcomponents.push(new TooltipPie(this.model, this.services));\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,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,aAAa;AACb,OAAO,EACN,KAAK,EAIL,QAAQ,EACR,UAAU,EACV,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,GAAG;YAC5B,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,UAAU,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC3D,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,iBAAC;AAAD,CAAC,AA9BD,CAAgC,QAAQ,GA8BvC","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\tTooltipPie\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 = [\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\tcomponents.push(new TooltipPie(this.model, this.services));\n\t\treturn components;\n\t}\n}\n"]}
package/charts/line.js CHANGED
@@ -37,7 +37,9 @@ var LineChart = /** @class */ (function (_super) {
37
37
  new Ruler(this.model, this.services),
38
38
  new Line(this.model, this.services),
39
39
  new Scatter(this.model, this.services, { handleThresholds: true }),
40
- new Skeleton(this.model, this.services, { skeleton: Skeletons.GRID })
40
+ new Skeleton(this.model, this.services, {
41
+ skeleton: Skeletons.GRID
42
+ })
41
43
  ];
42
44
  var components = this.getAxisChartComponents(graphFrameComponents);
43
45
  components.push(new TooltipScatter(this.model, this.services));
@@ -1 +1 @@
1
- {"version":3,"file":"line.js","sourceRoot":"","sources":["line.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAKlD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,aAAa;AACb,OAAO,EACN,IAAI,EACJ,I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AC,CAAC;QAC/D,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,gBAAC;AAAD,CAAC,AAhCD,CAA+B,SAAS,GAgCvC","sourcesContent":["// Internal Imports\nimport { AxisChart } from \"../axis-chart\";\nimport * as Configuration from \"../configuration\";\nimport {\n\tChartConfig,\n\tLineChartOptions\n} from \"../interfaces/index\";\nimport { Tools } from \"../tools\";\nimport { Skeletons } from \"../interfaces/enums\";\n\n// Components\nimport {\n\tGrid,\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\tTooltipScatter,\n\tSkeleton\n} from \"../components/index\";\n\nexport class LineChart extends AxisChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<LineChartOptions>) {\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.lineChart,\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 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 Scatter(this.model, this.services, { handleThresholds: true }),\n\t\t\tnew Skeleton(this.model, this.services, { skeleton: Skeletons.GRID })\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(graphFrameComponents);\n\t\tcomponents.push(new TooltipScatter(this.model, this.services));\n\t\treturn components;\n\t}\n}\n"]}
1
+ {"version":3,"file":"line.js","sourceRoot":"","sources":["line.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,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Q,EAAE,SAAS,CAAC,IAAI;aACxB,CAAC;SACF,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CACpD,oBAAoB,CACpB,CAAC;QACF,UAAU,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC/D,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,gBAAC;AAAD,CAAC,AApCD,CAA+B,SAAS,GAoCvC","sourcesContent":["// Internal Imports\nimport { AxisChart } from \"../axis-chart\";\nimport * as Configuration from \"../configuration\";\nimport { ChartConfig, LineChartOptions } from \"../interfaces/index\";\nimport { Tools } from \"../tools\";\nimport { Skeletons } from \"../interfaces/enums\";\n\n// Components\nimport {\n\tGrid,\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\tTooltipScatter,\n\tSkeleton\n} from \"../components/index\";\n\nexport class LineChart extends AxisChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<LineChartOptions>) {\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.lineChart,\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 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 Scatter(this.model, this.services, { handleThresholds: true }),\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\tcomponents.push(new TooltipScatter(this.model, this.services));\n\t\treturn components;\n\t}\n}\n"]}
package/charts/pie.js CHANGED
@@ -43,7 +43,9 @@ var PieChart = /** @class */ (function (_super) {
43
43
  // Specify what to render inside the graph-frame
44
44
  var graphFrameComponents = [
45
45
  new Pie(this.model, this.services),
46
- new Skeleton(this.model, this.services, { skeleton: Skeletons.PIE })
46
+ new Skeleton(this.model, this.services, {
47
+ skeleton: Skeletons.PIE
48
+ })
47
49
  ];
48
50
  // get the base chart components and export with tooltip
49
51
  var components = this.getChartComponents(graphFrameComponents);
package/charts/pie.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"pie.js","sourceRoot":"","sources":["pie.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAKlD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,aAAa;AACb,OAAO,EACN,GAAG;AACH,wEAAwE;AACxE,UAAU,EAGV,QAAQ,EACR,MAAM,qBAAqB,CAAC;AAE7B;IAA8B,4BAAK;IAGlC,yCAAyC;IACzC,kBAAY,MAAe,EAAE,YAA0C,EAAE,SAAiB;QAAjB,0BAAA,EAAA,iBAAiB;QAA1F,YACC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAkB3B;QAtBD,WAAK,GAAG,IAAI,aAAa,CAAC,KAAI,CAAC,QAAQ,CAAC,CAAC;QAMxC,yCAAyC;QACzC,IAAI,SAAS,EAAE;;SAEd;QAED,2CAA2C;QAC3C,iCAAiC;QACjC,KAAI,CAAC,KAAK,CAAC,UAAU,CACpB,KAAK,CAAC,wBAAwB,CAC7B,aAAa,CAAC,OAAO,CAAC,QAAQ,EAC9B,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QAEF,6CAA6C;QAC7C,KAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;;IACjC,CAAC;IAED,gCAAa,GAAb;QACC,gDAAgD;QAChD,IAAM,oBAAoB,GAAG;YAC5B,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YAClC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,SAAS,CAAC,GAAG,EAAE,CAAC;SACpE,CAAC;QAEF,wDAAwD;QACxD,IAAM,UAAU,GAAU,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;QACxE,UAAU,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC3D,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,eAAC;AAAD,CAAC,AArCD,CAA8B,KAAK,GAqClC","sourcesContent":["// Internal Imports\nimport { PieChartModel } from \"../model-pie\";\nimport { Chart } from \"../chart\";\nimport * as Configuration from \"../configuration\";\nimport {\n\tChartConfig,\n\tPieChartOptions\n} from \"../interfaces/index\";\nimport { Tools } from \"../tools\";\nimport { Skeletons } from \"../interfaces/enums\";\n\n// Components\nimport {\n\tPie,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltipPie,\n\tLegend,\n\tLayoutComponent,\n\tSkeleton\n} from \"../components/index\";\n\nexport class PieChart extends Chart {\n\tmodel = new PieChartModel(this.services);\n\n\t// TODO - Optimize the use of \"extending\"\n\tconstructor(holder: Element, chartConfigs: ChartConfig<PieChartOptions>, extending = false) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// TODO - Optimize the use of \"extending\"\n\t\tif (extending) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(\n\t\t\tTools.mergeDefaultChartOptions(\n\t\t\t\tConfiguration.options.pieChart,\n\t\t\t\tchartConfigs.options\n\t\t\t)\n\t\t);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetComponents() {\n\t\t// Specify what to render inside the graph-frame\n\t\tconst graphFrameComponents = [\n\t\t\tnew Pie(this.model, this.services),\n\t\t\tnew Skeleton(this.model, this.services, { skeleton: Skeletons.PIE })\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\tcomponents.push(new TooltipPie(this.model, this.services));\n\t\treturn components;\n\t}\n}\n"]}
1
+ {"version":3,"file":"pie.js","sourceRoot":"","sources":["pie.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,aAAa;AACb,OAAO,EACN,GAAG;AACH,wEAAwE;AACxE,UAAU,EAGV,QAAQ,EACR,MAAM,qBAAqB,CAAC;AAE7B;IAA8B,4BAAK;IAGlC,yCAAyC;IACzC,kBACC,MAAe,EACf,YAA0C,EAC1C,SAAiB;QAAjB,0BAAA,EAAA,iBAAiB;QAHlB,YAKC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAkB3B;QA1BD,WAAK,GAAG,IAAI,aAAa,CAAC,KAAI,CAAC,QAAQ,CAAC,CAAC;QAUxC,yCAAyC;QACzC,IAAI,SAAS,EAAE;;SAEd;QAED,2CAA2C;QAC3C,iCAAiC;QACjC,KAAI,CAAC,KAAK,CAAC,UAAU,CACpB,KAAK,CAAC,wBAAwB,CAC7B,aAAa,CAAC,OAAO,CAAC,QAAQ,EAC9B,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QAEF,6CAA6C;QAC7C,KAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;;IACjC,CAAC;IAED,gCAAa,GAAb;QACC,gDAAgD;QAChD,IAAM,oBAAoB,GAAG;YAC5B,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YAClC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;gBACvC,QAAQ,EAAE,SAAS,CAAC,GAAG;aACvB,CAAC;SACF,CAAC;QAEF,wDAAwD;QACxD,IAAM,UAAU,GAAU,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;QACxE,UAAU,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC3D,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,eAAC;AAAD,CAAC,AA3CD,CAA8B,KAAK,GA2ClC","sourcesContent":["// Internal Imports\nimport { PieChartModel } from \"../model-pie\";\nimport { Chart } from \"../chart\";\nimport * as Configuration from \"../configuration\";\nimport { ChartConfig, PieChartOptions } from \"../interfaces/index\";\nimport { Tools } from \"../tools\";\nimport { Skeletons } from \"../interfaces/enums\";\n\n// Components\nimport {\n\tPie,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltipPie,\n\tLegend,\n\tLayoutComponent,\n\tSkeleton\n} from \"../components/index\";\n\nexport class PieChart extends Chart {\n\tmodel = new PieChartModel(this.services);\n\n\t// TODO - Optimize the use of \"extending\"\n\tconstructor(\n\t\tholder: Element,\n\t\tchartConfigs: ChartConfig<PieChartOptions>,\n\t\textending = false\n\t) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// TODO - Optimize the use of \"extending\"\n\t\tif (extending) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(\n\t\t\tTools.mergeDefaultChartOptions(\n\t\t\t\tConfiguration.options.pieChart,\n\t\t\t\tchartConfigs.options\n\t\t\t)\n\t\t);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetComponents() {\n\t\t// Specify what to render inside the graph-frame\n\t\tconst graphFrameComponents = [\n\t\t\tnew Pie(this.model, this.services),\n\t\t\tnew Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.PIE\n\t\t\t})\n\t\t];\n\n\t\t// get the base chart components and export with tooltip\n\t\tconst components: any[] = this.getChartComponents(graphFrameComponents);\n\t\tcomponents.push(new TooltipPie(this.model, this.services));\n\t\treturn components;\n\t}\n}\n"]}
package/charts/radar.js CHANGED
@@ -37,9 +37,7 @@ var RadarChart = /** @class */ (function (_super) {
37
37
  }
38
38
  RadarChart.prototype.getComponents = function () {
39
39
  // Specify what to render inside the graph-frame
40
- var graphFrameComponents = [
41
- new Radar(this.model, this.services)
42
- ];
40
+ var graphFrameComponents = [new Radar(this.model, this.services)];
43
41
  // get the base chart components and export with tooltip
44
42
  var components = this.getChartComponents(graphFrameComponents);
45
43
  components.push(new TooltipRadar(this.model, this.services));
@@ -1 +1 @@
1
- {"version":3,"file":"radar.js","sourceRoot":"","sources":["radar.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAKlD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,aAAa;AACb,OAAO,EAIN,YAAY,EACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAEnD;IAAgC,8BAAK;IACpC,yCAAyC;IACzC,oBAAY,MAAe,EAAE,YAA4C,EAAE,SAAiB;QAAjB,0BAAA,EAAA,iBAAiB;QAA5F,YACC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAkB3B;QAhBA,yCAAyC;QACzC,IAAI,SAAS,EAAE;;SAEd;QAED,2CAA2C;QAC3C,iCAAiC;QACjC,KAAI,CAAC,KAAK,CAAC,UAAU,CACpB,KAAK,CAAC,wBAAwB,CAC7B,aAAa,CAAC,OAAO,CAAC,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;YAC5B,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;SACpC,CAAC;QAEF,wDAAwD;QACxD,IAAM,UAAU,GAAU,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;QACxE,UAAU,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC7D,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,iBAAC;AAAD,CAAC,AAlCD,CAAgC,KAAK,GAkCpC","sourcesContent":["// Internal Imports\nimport { Chart } from \"../chart\";\nimport * as Configuration from \"../configuration\";\nimport {\n\tChartConfig,\n\tRadarChartOptions\n} from \"../interfaces/index\";\nimport { Tools } from \"../tools\";\n\n// Components\nimport {\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tLegend,\n\tLayoutComponent,\n\tTooltipRadar\n} from \"../components/index\";\nimport { Radar } from \"../components/graphs/radar\";\n\nexport class RadarChart extends Chart {\n\t// TODO - Optimize the use of \"extending\"\n\tconstructor(holder: Element, chartConfigs: ChartConfig<RadarChartOptions>, extending = false) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// TODO - Optimize the use of \"extending\"\n\t\tif (extending) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(\n\t\t\tTools.mergeDefaultChartOptions(\n\t\t\t\tConfiguration.options.radarChart,\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 Radar(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\tcomponents.push(new TooltipRadar(this.model, this.services));\n\t\treturn components;\n\t}\n}\n"]}
1
+ {"version":3,"file":"radar.js","sourceRoot":"","sources":["radar.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;AAEjC,aAAa;AACb,OAAO,EAIN,YAAY,EACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAEnD;IAAgC,8BAAK;IACpC,yCAAyC;IACzC,oBACC,MAAe,EACf,YAA4C,EAC5C,SAAiB;QAAjB,0BAAA,EAAA,iBAAiB;QAHlB,YAKC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAkB3B;QAhBA,yCAAyC;QACzC,IAAI,SAAS,EAAE;;SAEd;QAED,2CAA2C;QAC3C,iCAAiC;QACjC,KAAI,CAAC,KAAK,CAAC,UAAU,CACpB,KAAK,CAAC,wBAAwB,CAC7B,aAAa,CAAC,OAAO,CAAC,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,wDAAwD;QACxD,IAAM,UAAU,GAAU,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;QACxE,UAAU,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC7D,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,iBAAC;AAAD,CAAC,AApCD,CAAgC,KAAK,GAoCpC","sourcesContent":["// Internal Imports\nimport { Chart } from \"../chart\";\nimport * as Configuration from \"../configuration\";\nimport { ChartConfig, RadarChartOptions } from \"../interfaces/index\";\nimport { Tools } from \"../tools\";\n\n// Components\nimport {\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tLegend,\n\tLayoutComponent,\n\tTooltipRadar\n} from \"../components/index\";\nimport { Radar } from \"../components/graphs/radar\";\n\nexport class RadarChart extends Chart {\n\t// TODO - Optimize the use of \"extending\"\n\tconstructor(\n\t\tholder: Element,\n\t\tchartConfigs: ChartConfig<RadarChartOptions>,\n\t\textending = false\n\t) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// TODO - Optimize the use of \"extending\"\n\t\tif (extending) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(\n\t\t\tTools.mergeDefaultChartOptions(\n\t\t\t\tConfiguration.options.radarChart,\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 Radar(this.model, this.services)];\n\n\t\t// get the base chart components and export with tooltip\n\t\tconst components: any[] = this.getChartComponents(graphFrameComponents);\n\t\tcomponents.push(new TooltipRadar(this.model, this.services));\n\t\treturn components;\n\t}\n}\n"]}
package/charts/scatter.js CHANGED
@@ -36,7 +36,9 @@ var ScatterChart = /** @class */ (function (_super) {
36
36
  new Grid(this.model, this.services),
37
37
  new Ruler(this.model, this.services),
38
38
  new Scatter(this.model, this.services),
39
- new Skeleton(this.model, this.services, { skeleton: Skeletons.GRID })
39
+ new Skeleton(this.model, this.services, {
40
+ skeleton: Skeletons.GRID
41
+ })
40
42
  ];
41
43
  var components = this.getAxisChartComponents(graphFrameComponents);
42
44
  components.push(new TooltipScatter(this.model, this.services));
@@ -1 +1 @@
1
- {"version":3,"file":"scatter.js","sourceRoot":"","sources":["scatter.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAKlD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,aAAa;AACb,OAAO,EACN,IAAI,EACJ,KAAK,EACL,OAAO,EACP,kBAAkB,EAKlB,cAAc,EACd,QAAQ,EACR,MAAM,qBAAqB,CAAC;AAE7B;IAAkC,gCAAS;IAC1C,sBAAY,MAAe,EAAE,YAA8C;QAA3E,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,YAAY,EAClC,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QAEF,6CAA6C;QAC7C,KAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;;IACjC,CAAC;IAED,oCAAa,GAAb;QACC,gDAAgD;QAChD,IAAM,oBAAoB,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,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACpC,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACtC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC;SACrE,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CAAC,oBAAoB,CAAC,CAAC;QAC5E,UAAU,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC/D,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,mBAAC;AAAD,CAAC,AA/BD,CAAkC,SAAS,GA+B1C","sourcesContent":["// Internal Imports\nimport { AxisChart } from \"../axis-chart\";\nimport * as Configuration from \"../configuration\";\nimport {\n\tChartConfig,\n\tScatterChartOptions\n} from \"../interfaces/index\";\nimport { Tools } from \"../tools\";\nimport { Skeletons } from \"../interfaces/enums\";\n\n// Components\nimport {\n\tGrid,\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\tTooltipScatter,\n\tSkeleton\n} from \"../components/index\";\n\nexport class ScatterChart extends AxisChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<ScatterChartOptions>) {\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.scatterChart,\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 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 Scatter(this.model, this.services),\n\t\t\tnew Skeleton(this.model, this.services, { skeleton: Skeletons.GRID })\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(graphFrameComponents);\n\t\tcomponents.push(new TooltipScatter(this.model, this.services));\n\t\treturn components;\n\t}\n}\n"]}
1
+ {"version":3,"file":"scatter.js","sourceRoot":"","sources":["scatter.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,OAAO,EACP,kBAAkB,EAKlB,cAAc,EACd,QAAQ,EACR,MAAM,qBAAqB,CAAC;AAE7B;IAAkC,gCAAS;IAC1C,sBACC,MAAe,EACf,YAA8C;QAF/C,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,YAAY,EAClC,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QAEF,6CAA6C;QAC7C,KAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;;IACjC,CAAC;IAED,oCAAa,GAAb;QACC,gDAAgD;QAChD,IAAM,oBAAoB,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,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACpC,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACtC,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,UAAU,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC/D,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,mBAAC;AAAD,CAAC,AAtCD,CAAkC,SAAS,GAsC1C","sourcesContent":["// Internal Imports\nimport { AxisChart } from \"../axis-chart\";\nimport * as Configuration from \"../configuration\";\nimport { ChartConfig, ScatterChartOptions } from \"../interfaces/index\";\nimport { Tools } from \"../tools\";\nimport { Skeletons } from \"../interfaces/enums\";\n\n// Components\nimport {\n\tGrid,\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\tTooltipScatter,\n\tSkeleton\n} from \"../components/index\";\n\nexport class ScatterChart extends AxisChart {\n\tconstructor(\n\t\tholder: Element,\n\t\tchartConfigs: ChartConfig<ScatterChartOptions>\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.scatterChart,\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 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 Scatter(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\tcomponents.push(new TooltipScatter(this.model, this.services));\n\t\treturn components;\n\t}\n}\n"]}