@carbon/charts 0.41.34 → 0.41.38

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 (102) hide show
  1. package/CHANGELOG.md +36 -1
  2. package/axis-chart.d.ts +1 -1
  3. package/axis-chart.js +5 -3
  4. package/axis-chart.js.map +1 -1
  5. package/build/demo/data/boxplot.d.ts +34 -0
  6. package/build/demo/data/combo.d.ts +4 -31
  7. package/build/demo/data/index.d.ts +6 -0
  8. package/build/src/axis-chart.d.ts +1 -1
  9. package/build/src/charts/boxplot.d.ts +8 -0
  10. package/build/src/charts/index.d.ts +1 -0
  11. package/build/src/components/axes/ruler-stacked.d.ts +0 -1
  12. package/build/src/components/axes/two-dimensional-axes.d.ts +0 -1
  13. package/build/src/components/component.d.ts +1 -1
  14. package/build/src/components/essentials/threshold.d.ts +3 -6
  15. package/build/src/components/graphs/area-stacked.d.ts +1 -1
  16. package/build/src/components/graphs/boxplot.d.ts +7 -0
  17. package/build/src/components/index.d.ts +1 -0
  18. package/build/src/configuration-non-customizable.d.ts +19 -0
  19. package/build/src/configuration.d.ts +2 -1
  20. package/build/src/interfaces/axis-scales.d.ts +6 -1
  21. package/build/src/interfaces/charts.d.ts +6 -1
  22. package/build/src/interfaces/enums.d.ts +7 -0
  23. package/build/src/interfaces/events.d.ts +13 -0
  24. package/build/src/model-boxplot.d.ts +12 -0
  25. package/build/src/model.d.ts +1 -1
  26. package/bundle.js +1 -1
  27. package/charts/boxplot.d.ts +8 -0
  28. package/charts/boxplot.js +55 -0
  29. package/charts/boxplot.js.map +1 -0
  30. package/charts/index.d.ts +1 -0
  31. package/charts/index.js +1 -0
  32. package/charts/index.js.map +1 -1
  33. package/components/axes/axis.js +34 -13
  34. package/components/axes/axis.js.map +1 -1
  35. package/components/axes/ruler-stacked.d.ts +0 -1
  36. package/components/axes/ruler-stacked.js +0 -8
  37. package/components/axes/ruler-stacked.js.map +1 -1
  38. package/components/axes/two-dimensional-axes.d.ts +0 -1
  39. package/components/axes/two-dimensional-axes.js +0 -29
  40. package/components/axes/two-dimensional-axes.js.map +1 -1
  41. package/components/component.d.ts +1 -1
  42. package/components/component.js.map +1 -1
  43. package/components/essentials/threshold.d.ts +3 -6
  44. package/components/essentials/threshold.js +158 -79
  45. package/components/essentials/threshold.js.map +1 -1
  46. package/components/graphs/area-stacked.d.ts +1 -1
  47. package/components/graphs/area-stacked.js +5 -3
  48. package/components/graphs/area-stacked.js.map +1 -1
  49. package/components/graphs/boxplot.d.ts +7 -0
  50. package/components/graphs/boxplot.js +420 -0
  51. package/components/graphs/boxplot.js.map +1 -0
  52. package/components/index.d.ts +1 -0
  53. package/components/index.js +1 -0
  54. package/components/index.js.map +1 -1
  55. package/configuration-non-customizable.d.ts +19 -0
  56. package/configuration-non-customizable.js +19 -0
  57. package/configuration-non-customizable.js.map +1 -1
  58. package/configuration.d.ts +2 -1
  59. package/configuration.js +5 -0
  60. package/configuration.js.map +1 -1
  61. package/demo/data/boxplot.d.ts +34 -0
  62. package/demo/data/boxplot.js +48 -0
  63. package/demo/data/boxplot.js.map +1 -0
  64. package/demo/data/bubble.js +4 -4
  65. package/demo/data/bubble.js.map +1 -1
  66. package/demo/data/bundle.js +1 -1
  67. package/demo/data/combo.d.ts +4 -31
  68. package/demo/data/combo.js +4 -42
  69. package/demo/data/combo.js.map +1 -1
  70. package/demo/data/index.d.ts +6 -0
  71. package/demo/data/index.js +22 -6
  72. package/demo/data/index.js.map +1 -1
  73. package/demo/styles.css +4 -4
  74. package/demo/styles.min.css +1 -1
  75. package/demo/tsconfig.tsbuildinfo +31 -17
  76. package/interfaces/axis-scales.d.ts +6 -1
  77. package/interfaces/axis-scales.js.map +1 -1
  78. package/interfaces/charts.d.ts +6 -1
  79. package/interfaces/charts.js.map +1 -1
  80. package/interfaces/enums.d.ts +7 -0
  81. package/interfaces/enums.js +8 -0
  82. package/interfaces/enums.js.map +1 -1
  83. package/interfaces/events.d.ts +13 -0
  84. package/interfaces/events.js +14 -0
  85. package/interfaces/events.js.map +1 -1
  86. package/model-boxplot.d.ts +12 -0
  87. package/model-boxplot.js +99 -0
  88. package/model-boxplot.js.map +1 -0
  89. package/model.d.ts +1 -1
  90. package/model.js +3 -2
  91. package/model.js.map +1 -1
  92. package/package.json +1 -1
  93. package/styles/components/_threshold.scss +1 -1
  94. package/styles-g10.css +1 -1
  95. package/styles-g10.min.css +1 -1
  96. package/styles-g100.css +1 -1
  97. package/styles-g100.min.css +1 -1
  98. package/styles-g90.css +1 -1
  99. package/styles-g90.min.css +1 -1
  100. package/styles.css +1 -1
  101. package/styles.min.css +1 -1
  102. package/tsconfig.tsbuildinfo +97 -31
package/CHANGELOG.md CHANGED
@@ -3,7 +3,7 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [0.41.34](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.33...v0.41.34) (2021-02-22)
6
+ ## [0.41.38](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.37...v0.41.38) (2021-02-23)
7
7
 
8
8
  **Note:** Version bump only for package @carbon/charts
9
9
 
@@ -11,6 +11,41 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
 
12
12
 
13
13
 
14
+ ## [0.41.37](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.36...v0.41.37) (2021-02-23)
15
+
16
+ **Note:** Version bump only for package @carbon/charts
17
+
18
+
19
+
20
+
21
+
22
+ # Change Log
23
+
24
+ All notable changes to this project will be documented in this file. See
25
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
26
+
27
+ ## [0.41.36](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.35...v0.41.36) (2021-02-22)
28
+
29
+ **Note:** Version bump only for package @carbon/charts
30
+
31
+ # Change Log
32
+
33
+ All notable changes to this project will be documented in this file. See
34
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
35
+
36
+ ## [0.41.35](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.34...v0.41.35) (2021-02-22)
37
+
38
+ **Note:** Version bump only for package @carbon/charts
39
+
40
+ # Change Log
41
+
42
+ All notable changes to this project will be documented in this file. See
43
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
44
+
45
+ ## [0.41.34](https://github.com/carbon-design-system/carbon-charts/compare/v0.41.33...v0.41.34) (2021-02-22)
46
+
47
+ **Note:** Version bump only for package @carbon/charts
48
+
14
49
  # Change Log
15
50
 
16
51
  All notable changes to this project will be documented in this file. See
package/axis-chart.d.ts CHANGED
@@ -6,5 +6,5 @@ export declare class AxisChart extends Chart {
6
6
  services: any;
7
7
  model: ChartModelCartesian;
8
8
  constructor(holder: Element, chartConfigs: ChartConfig<AxisChartOptions>);
9
- protected getAxisChartComponents(graphFrameComponents: any[]): (LayoutComponent | AxisChartsTooltip)[];
9
+ protected getAxisChartComponents(graphFrameComponents: any[], configs?: object): (LayoutComponent | AxisChartsTooltip)[];
10
10
  }
package/axis-chart.js CHANGED
@@ -21,7 +21,7 @@ var __spreadArrays = (this && this.__spreadArrays) || function () {
21
21
  import { Chart } from './chart';
22
22
  import { ChartModelCartesian } from './model-cartesian-charts';
23
23
  import { LayoutDirection, LayoutGrowth, LegendOrientations, LegendPositions, AxisPositions, ScaleTypes, } from './interfaces';
24
- import { ChartBrush, ChartClip, LayoutComponent, Legend, Title, AxisChartsTooltip, Spacer, Toolbar, ZoomBar, } from './components';
24
+ import { ChartBrush, ChartClip, LayoutComponent, Legend, Threshold, Title, AxisChartsTooltip, Spacer, Toolbar, ZoomBar, } from './components';
25
25
  import { Tools } from './tools';
26
26
  import { CartesianScales, Curves, Zoom } from './services';
27
27
  var AxisChart = /** @class */ (function (_super) {
@@ -36,7 +36,7 @@ var AxisChart = /** @class */ (function (_super) {
36
36
  _this.model = new ChartModelCartesian(_this.services);
37
37
  return _this;
38
38
  }
39
- AxisChart.prototype.getAxisChartComponents = function (graphFrameComponents) {
39
+ AxisChart.prototype.getAxisChartComponents = function (graphFrameComponents, configs) {
40
40
  var isZoomBarEnabled = Tools.getProperty(this.model.getOptions(), 'zoomBar', AxisPositions.TOP, 'enabled');
41
41
  var toolbarEnabled = Tools.getProperty(this.model.getOptions(), 'toolbar', 'enabled');
42
42
  this.services.cartesianScales.determineAxisDuality();
@@ -94,6 +94,7 @@ var AxisChart = /** @class */ (function (_super) {
94
94
  if (zoomBarEnabled && !isZoomBarLocked) {
95
95
  graphFrameComponents.push(new ChartClip(this.model, this.services), new ChartBrush(this.model, this.services));
96
96
  }
97
+ graphFrameComponents.push(new Threshold(this.model, this.services));
97
98
  var graphFrameComponent = {
98
99
  id: 'graph-frame',
99
100
  components: graphFrameComponents,
@@ -102,7 +103,8 @@ var AxisChart = /** @class */ (function (_super) {
102
103
  y: LayoutGrowth.FIXED,
103
104
  },
104
105
  };
105
- var isLegendEnabled = this.model.getOptions().legend.enabled !== false;
106
+ var isLegendEnabled = Tools.getProperty(configs, 'legend', 'enabled') !== false &&
107
+ this.model.getOptions().legend.enabled !== false;
106
108
  // Decide the position of the legend in reference to the chart
107
109
  var fullFrameComponentDirection = LayoutDirection.COLUMN;
108
110
  if (isLegendEnabled) {
package/axis-chart.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"axis-chart.js","sourceRoot":"","sources":["axis-chart.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EACN,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,eAAe,EAGf,aAAa,EACb,UAAU,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,EACN,UAAU,EACV,SAAS,EACT,eAAe,EACf,MAAM,EACN,KAAK,EACL,iBAAiB,EACjB,MAAM,EACN,OAAO,EACP,OAAO,GACP,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK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UAAU,EAAE,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;YACpD,MAAM,EAAE;gBACP,CAAC,EAAE,YAAY,CAAC,SAAS;gBACzB,CAAC,EAAE,YAAY,CAAC,KAAK;aACrB;SACD,CAAC;QAEF,IAAM,wBAAwB,GAAG,EAAE,CAAC;QACpC,2DAA2D;QAC3D,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;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,IAAI,cAAc,EAAE;YACnB,wBAAwB,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;SAChD;QACD,wBAAwB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAElD,OAAO;YACN,IAAI,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YAChD,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,gBAAC;AAAD,CAAC,AA/ND,CAA+B,KAAK,GA+NnC","sourcesContent":["import { Chart } from './chart';\nimport { ChartModelCartesian } from './model-cartesian-charts';\nimport {\n\tLayoutDirection,\n\tLayoutGrowth,\n\tLegendOrientations,\n\tLegendPositions,\n\tChartConfig,\n\tAxisChartOptions,\n\tAxisPositions,\n\tScaleTypes,\n} from './interfaces';\nimport {\n\tChartBrush,\n\tChartClip,\n\tLayoutComponent,\n\tLegend,\n\tTitle,\n\tAxisChartsTooltip,\n\tSpacer,\n\tToolbar,\n\tZoomBar,\n} from './components';\nimport { Tools } from './tools';\n\nimport { CartesianScales, Curves, Zoom } from './services';\n\nexport class AxisChart extends Chart {\n\tservices: any = Object.assign(this.services, {\n\t\tcartesianScales: CartesianScales,\n\t\tcurves: Curves,\n\t\tzoom: Zoom,\n\t});\n\tmodel: ChartModelCartesian = new ChartModelCartesian(this.services);\n\n\tconstructor(holder: Element, chartConfigs: ChartConfig<AxisChartOptions>) {\n\t\tsuper(holder, chartConfigs);\n\t}\n\n\tprotected getAxisChartComponents(graphFrameComponents: any[]) {\n\t\tconst isZoomBarEnabled = Tools.getProperty(\n\t\t\tthis.model.getOptions(),\n\t\t\t'zoomBar',\n\t\t\tAxisPositions.TOP,\n\t\t\t'enabled'\n\t\t);\n\t\tconst toolbarEnabled = Tools.getProperty(\n\t\t\tthis.model.getOptions(),\n\t\t\t'toolbar',\n\t\t\t'enabled'\n\t\t);\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 mainXAxisPosition = this.services.cartesianScales.getMainXAxisPosition();\n\t\tconst mainXScaleType = Tools.getProperty(\n\t\t\tthis.model.getOptions(),\n\t\t\t'axes',\n\t\t\tmainXAxisPosition,\n\t\t\t'scaleType'\n\t\t);\n\t\t// @todo - Zoom Bar only supports main axis at BOTTOM axis and time scale for now\n\t\tconst zoomBarEnabled =\n\t\t\tisZoomBarEnabled &&\n\t\t\tmainXAxisPosition === AxisPositions.BOTTOM &&\n\t\t\tmainXScaleType === ScaleTypes.TIME;\n\n\t\t// @todo - should check if zoom bar in all axes are locked\n\t\tconst isZoomBarLocked = this.services.zoom.isZoomBarLocked(\n\t\t\tAxisPositions.TOP\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: {\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 toolbarComponent = {\n\t\t\tid: 'toolbar',\n\t\t\tcomponents: [new Toolbar(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 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}\n\t\t\t\t),\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: [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\t// if all zoom bars are locked, no need to add chart brush\n\t\tif (zoomBarEnabled && !isZoomBarLocked) {\n\t\t\tgraphFrameComponents.push(\n\t\t\t\tnew ChartClip(this.model, this.services),\n\t\t\t\tnew ChartBrush(this.model, this.services)\n\t\t\t);\n\t\t}\n\n\t\tconst graphFrameComponent = {\n\t\t\tid: 'graph-frame',\n\t\t\tcomponents: graphFrameComponents,\n\t\t\tgrowth: {\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\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 === LegendPositions.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 === LegendPositions.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 === LegendPositions.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\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: {\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 zoomBarComponent = {\n\t\t\tid: 'zoom-bar',\n\t\t\tcomponents: [new ZoomBar(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 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: {\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\tif (zoomBarEnabled) {\n\t\t\ttopLevelLayoutComponents.push(zoomBarComponent);\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 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":"axis-chart.js","sourceRoot":"","sources":["axis-chart.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EACN,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,eAAe,EAGf,aAAa,EACb,UAAU,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,EACN,UAAU,EACV,SAAS,EACT,eAAe,EACf,MAAM,EACN,SAAS,EACT,KAAK,EACL,iBAAiB,EACjB,MAAM,EACN,OAAO,EACP,OAAO,GACP,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAE3D;IAA+B,6BAAK;IAQnC,mBAAY,MAAe,EAAE,YAA2C;QAAxE,YACC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAC3B;QATD,cAAQ,GAAQ,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC,QAAQ,EAAE;YAC5C,eAAe,EAAE,eAAe;YAChC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACV,CAAC,CAAC;QACH,WAAK,GAAwB,IAAI,mBAAmB,CAAC,KAAI,CAAC,QAAQ,CAAC,CAAC;;IAIpE,CAAC;IAES,0CAAsB,GAAhC,UACC,oBAA2B,EAC3B,OAAgB;QAEhB,IAAM,gBAAgB,GAAG,KAAK,CAAC,WAAW,CACzC,IAAI,CAAC,KAAK,CAAC,U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;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;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,IAAI,cAAc,EAAE;YACnB,wBAAwB,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;SAChD;QACD,wBAAwB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAElD,OAAO;YACN,IAAI,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YAChD,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,gBAAC;AAAD,CAAC,AArOD,CAA+B,KAAK,GAqOnC","sourcesContent":["import { Chart } from './chart';\nimport { ChartModelCartesian } from './model-cartesian-charts';\nimport {\n\tLayoutDirection,\n\tLayoutGrowth,\n\tLegendOrientations,\n\tLegendPositions,\n\tChartConfig,\n\tAxisChartOptions,\n\tAxisPositions,\n\tScaleTypes,\n} from './interfaces';\nimport {\n\tChartBrush,\n\tChartClip,\n\tLayoutComponent,\n\tLegend,\n\tThreshold,\n\tTitle,\n\tAxisChartsTooltip,\n\tSpacer,\n\tToolbar,\n\tZoomBar,\n} from './components';\nimport { Tools } from './tools';\n\nimport { CartesianScales, Curves, Zoom } from './services';\n\nexport class AxisChart extends Chart {\n\tservices: any = Object.assign(this.services, {\n\t\tcartesianScales: CartesianScales,\n\t\tcurves: Curves,\n\t\tzoom: Zoom,\n\t});\n\tmodel: ChartModelCartesian = new ChartModelCartesian(this.services);\n\n\tconstructor(holder: Element, chartConfigs: ChartConfig<AxisChartOptions>) {\n\t\tsuper(holder, chartConfigs);\n\t}\n\n\tprotected getAxisChartComponents(\n\t\tgraphFrameComponents: any[],\n\t\tconfigs?: object\n\t) {\n\t\tconst isZoomBarEnabled = Tools.getProperty(\n\t\t\tthis.model.getOptions(),\n\t\t\t'zoomBar',\n\t\t\tAxisPositions.TOP,\n\t\t\t'enabled'\n\t\t);\n\t\tconst toolbarEnabled = Tools.getProperty(\n\t\t\tthis.model.getOptions(),\n\t\t\t'toolbar',\n\t\t\t'enabled'\n\t\t);\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 mainXAxisPosition = this.services.cartesianScales.getMainXAxisPosition();\n\t\tconst mainXScaleType = Tools.getProperty(\n\t\t\tthis.model.getOptions(),\n\t\t\t'axes',\n\t\t\tmainXAxisPosition,\n\t\t\t'scaleType'\n\t\t);\n\t\t// @todo - Zoom Bar only supports main axis at BOTTOM axis and time scale for now\n\t\tconst zoomBarEnabled =\n\t\t\tisZoomBarEnabled &&\n\t\t\tmainXAxisPosition === AxisPositions.BOTTOM &&\n\t\t\tmainXScaleType === ScaleTypes.TIME;\n\n\t\t// @todo - should check if zoom bar in all axes are locked\n\t\tconst isZoomBarLocked = this.services.zoom.isZoomBarLocked(\n\t\t\tAxisPositions.TOP\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: {\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 toolbarComponent = {\n\t\t\tid: 'toolbar',\n\t\t\tcomponents: [new Toolbar(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 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}\n\t\t\t\t),\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: [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\t// if all zoom bars are locked, no need to add chart brush\n\t\tif (zoomBarEnabled && !isZoomBarLocked) {\n\t\t\tgraphFrameComponents.push(\n\t\t\t\tnew ChartClip(this.model, this.services),\n\t\t\t\tnew ChartBrush(this.model, this.services)\n\t\t\t);\n\t\t}\n\n\t\tgraphFrameComponents.push(new Threshold(this.model, this.services));\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\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\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 === LegendPositions.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 === LegendPositions.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 === LegendPositions.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\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: {\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 zoomBarComponent = {\n\t\t\tid: 'zoom-bar',\n\t\t\tcomponents: [new ZoomBar(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 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: {\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\tif (zoomBarEnabled) {\n\t\t\ttopLevelLayoutComponents.push(zoomBarComponent);\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 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"]}
@@ -0,0 +1,34 @@
1
+ export declare const simpleBoxplotData: {
2
+ group: string;
3
+ key: string;
4
+ value: number;
5
+ }[];
6
+ export declare const simpleBoxplotOptions: {
7
+ title: string;
8
+ axes: {
9
+ bottom: {
10
+ mapsTo: string;
11
+ };
12
+ left: {
13
+ scaleType: string;
14
+ mapsTo: string;
15
+ };
16
+ };
17
+ };
18
+ export declare const simpleVerticalBoxplotData: {
19
+ group: string;
20
+ key: string;
21
+ value: number;
22
+ }[];
23
+ export declare const simpleVerticalBoxplotOptions: {
24
+ title: string;
25
+ axes: {
26
+ left: {
27
+ mapsTo: string;
28
+ };
29
+ bottom: {
30
+ scaleType: string;
31
+ mapsTo: string;
32
+ };
33
+ };
34
+ };
@@ -346,37 +346,6 @@ export declare const comboLoadingOptions: {
346
346
  correspondingDatasets: string[];
347
347
  }[];
348
348
  };
349
- export declare const comboErrorData: ({
350
- group: string;
351
- key: string;
352
- temp: number;
353
- value?: undefined;
354
- } | {
355
- group: string;
356
- key: string;
357
- value: number;
358
- temp?: undefined;
359
- })[];
360
- export declare const comboErrorOptions: {
361
- experimental: boolean;
362
- title: string;
363
- axes: {
364
- left: {
365
- mapsTo: string;
366
- title: string;
367
- };
368
- bottom: {
369
- scaleType: string;
370
- mapsTo: string;
371
- };
372
- right: {
373
- title: string;
374
- mapsTo: string;
375
- scaleType: string;
376
- correspondingDatasets: string[];
377
- };
378
- };
379
- };
380
349
  export declare const comboStackedAreaLine: ({
381
350
  group: string;
382
351
  date: Date;
@@ -393,17 +362,21 @@ export declare const comboStackedAreaLineOptions: {
393
362
  title: string;
394
363
  axes: {
395
364
  left: {
365
+ title: string;
396
366
  stacked: boolean;
397
367
  mapsTo: string;
368
+ titleOrientation: string;
398
369
  };
399
370
  bottom: {
400
371
  scaleType: string;
401
372
  mapsTo: string;
402
373
  };
403
374
  right: {
375
+ title: string;
404
376
  scaleType: string;
405
377
  mapsTo: string;
406
378
  correspondingDatasets: string[];
379
+ titleOrientation: string;
407
380
  };
408
381
  };
409
382
  curve: string;
@@ -1,5 +1,6 @@
1
1
  export * from './area';
2
2
  export * from './bar';
3
+ export * from './boxplot';
3
4
  export * from './bubble';
4
5
  export * from './donut';
5
6
  export * from './line';
@@ -32,6 +33,11 @@ export declare const chartTypes: {
32
33
  angular: string;
33
34
  vue: string;
34
35
  };
36
+ BoxplotChart: {
37
+ vanilla: string;
38
+ angular: string;
39
+ vue: string;
40
+ };
35
41
  BubbleChart: {
36
42
  vanilla: string;
37
43
  angular: string;
@@ -6,5 +6,5 @@ export declare class AxisChart extends Chart {
6
6
  services: any;
7
7
  model: ChartModelCartesian;
8
8
  constructor(holder: Element, chartConfigs: ChartConfig<AxisChartOptions>);
9
- protected getAxisChartComponents(graphFrameComponents: any[]): (AxisChartsTooltip | LayoutComponent)[];
9
+ protected getAxisChartComponents(graphFrameComponents: any[], configs?: object): (AxisChartsTooltip | LayoutComponent)[];
10
10
  }
@@ -0,0 +1,8 @@
1
+ import { BoxplotChartModel } from '../model-boxplot';
2
+ import { AxisChart } from '../axis-chart';
3
+ import { BoxplotChartOptions, ChartConfig } from '../interfaces/index';
4
+ export declare class BoxplotChart extends AxisChart {
5
+ model: BoxplotChartModel;
6
+ constructor(holder: Element, chartConfigs: ChartConfig<BoxplotChartOptions>);
7
+ getComponents(): any[];
8
+ }
@@ -3,6 +3,7 @@ export * from './area-stacked';
3
3
  export * from './bar-simple';
4
4
  export * from './bar-grouped';
5
5
  export * from './bar-stacked';
6
+ export * from './boxplot';
6
7
  export * from './bubble';
7
8
  export * from './line';
8
9
  export * from './lollipop';
@@ -1,5 +1,4 @@
1
1
  import { Ruler } from './ruler';
2
2
  export declare class StackedRuler extends Ruler {
3
3
  formatTooltipData(tooltipData: any): any;
4
- hideRuler(): void;
5
4
  }
@@ -11,5 +11,4 @@ export declare class TwoDimensionalAxes extends Component {
11
11
  left: number;
12
12
  };
13
13
  render(animate?: boolean): void;
14
- addAxisThresholds(animate: any, axisPosition: any): void;
15
14
  }
@@ -4,7 +4,7 @@ export declare class Component {
4
4
  id: string;
5
5
  protected parent: any;
6
6
  protected configs: any;
7
- protected model: ChartModel;
7
+ protected model: any;
8
8
  protected services: any;
9
9
  constructor(model: ChartModel, services: any, configs?: any);
10
10
  init(): void;
@@ -3,15 +3,12 @@ import { ChartModel } from '../../model';
3
3
  import Position from '@carbon/utils-position';
4
4
  export declare class Threshold extends Component {
5
5
  type: string;
6
- threshold: any;
7
- thresholdClass: string;
8
- thresholdIdentifierClass: string;
9
6
  label: any;
10
7
  positionService: Position;
11
- constructor(model: ChartModel, services: any, configs: any);
8
+ constructor(model: ChartModel, services: any);
12
9
  render(animate?: boolean): void;
13
- getFormattedValue(): any;
10
+ getFormattedValue(datum: any): any;
14
11
  appendThresholdLabel(): void;
15
- setThresholdLabelPosition(): void;
12
+ setThresholdLabelPosition(datum: any): void;
16
13
  addEventListeners(): void;
17
14
  }
@@ -5,6 +5,6 @@ export declare class StackedArea extends Component {
5
5
  init(): void;
6
6
  render(animate?: boolean): void;
7
7
  handleLegendOnHover: (event: CustomEvent<any>) => void;
8
- handleLegendMouseOut: (event: CustomEvent<any>) => void;
8
+ handleLegendMouseOut: () => void;
9
9
  destroy(): void;
10
10
  }
@@ -0,0 +1,7 @@
1
+ import { Component } from '../component';
2
+ export declare class Boxplot extends Component {
3
+ type: string;
4
+ render(animate: boolean): void;
5
+ addBoxEventListeners(): void;
6
+ addCircleEventListeners(): void;
7
+ }
@@ -10,6 +10,7 @@ export * from './graphs/area-stacked';
10
10
  export * from './graphs/bar-simple';
11
11
  export * from './graphs/bar-grouped';
12
12
  export * from './graphs/bar-stacked';
13
+ export * from './graphs/boxplot';
13
14
  export * from './graphs/bubble';
14
15
  export * from './graphs/line';
15
16
  export * from './graphs/lollipop';
@@ -24,6 +24,25 @@ export declare const axis: {
24
24
  };
25
25
  paddingRatio: number;
26
26
  };
27
+ export declare const boxplot: {
28
+ circle: {
29
+ radius: number;
30
+ opacity: {
31
+ hovered: number;
32
+ default: number;
33
+ };
34
+ };
35
+ box: {
36
+ opacity: {
37
+ hovered: number;
38
+ default: number;
39
+ };
40
+ };
41
+ strokeWidth: {
42
+ default: number;
43
+ thicker: number;
44
+ };
45
+ };
27
46
  export declare const legend: {
28
47
  items: {
29
48
  status: {
@@ -1,4 +1,4 @@
1
- import { BaseChartOptions, AxisChartOptions, ScatterChartOptions, LollipopChartOptions, LineChartOptions, BarChartOptions, StackedBarChartOptions, AreaChartOptions, PieChartOptions, GaugeChartOptions, DonutChartOptions, BubbleChartOptions, RadarChartOptions, ComboChartOptions, TreemapChartOptions, GridOptions, RulerOptions, TimeScaleOptions, TooltipOptions, MeterChartOptions } from './interfaces';
1
+ import { BaseChartOptions, AxisChartOptions, ScatterChartOptions, LollipopChartOptions, LineChartOptions, BarChartOptions, StackedBarChartOptions, BoxplotChartOptions, AreaChartOptions, PieChartOptions, GaugeChartOptions, DonutChartOptions, BubbleChartOptions, RadarChartOptions, ComboChartOptions, TreemapChartOptions, GridOptions, RulerOptions, TimeScaleOptions, TooltipOptions, MeterChartOptions } from './interfaces';
2
2
  /**
3
3
  * Grid options
4
4
  */
@@ -18,6 +18,7 @@ export declare const options: {
18
18
  simpleBarChart: BarChartOptions;
19
19
  groupedBarChart: BarChartOptions;
20
20
  stackedBarChart: StackedBarChartOptions;
21
+ boxplotChart: BoxplotChartOptions;
21
22
  bubbleChart: BubbleChartOptions;
22
23
  lineChart: LineChartOptions;
23
24
  areaChart: AreaChartOptions;
@@ -1,4 +1,4 @@
1
- import { ScaleTypes, TickRotations } from './enums';
1
+ import { ScaleTypes, TickRotations, AxisTitleOrientations } from './enums';
2
2
  import { AxisDomain } from 'd3';
3
3
  import { Locale } from 'date-fns';
4
4
  import { ThresholdOptions } from './components';
@@ -42,6 +42,11 @@ export interface AxisOptions {
42
42
  * optional title for the scales
43
43
  */
44
44
  title?: string;
45
+ /**
46
+ * Override for the orientation of the title (for vertical axes).
47
+ * The title string can be overrided to be rotated left or right.
48
+ */
49
+ titleOrientation?: AxisTitleOrientations;
45
50
  /**
46
51
  * thresholds
47
52
  * Example:
@@ -78,7 +78,7 @@ export interface BaseChartOptions {
78
78
  */
79
79
  color?: {
80
80
  /**
81
- * e.g. { "Dataset 1": "blue" }
81
+ * e.g. { 'Dataset 1': 'blue' }
82
82
  */
83
83
  scale?: object;
84
84
  /**
@@ -110,6 +110,11 @@ export interface AxisChartOptions extends BaseChartOptions {
110
110
  */
111
111
  zoomBar?: ZoomBarsOptions;
112
112
  }
113
+ /**
114
+ * options specific to boxplot charts
115
+ */
116
+ export interface BoxplotChartOptions extends AxisChartOptions {
117
+ }
113
118
  /**
114
119
  * options specific to bar charts
115
120
  */
@@ -181,3 +181,10 @@ export declare enum ToolbarControlTypes {
181
181
  ZOOM_OUT = "Zoom out",
182
182
  RESET_ZOOM = "Reset zoom"
183
183
  }
184
+ /**
185
+ * enum of title orientations for _vertical axes_
186
+ */
187
+ export declare enum AxisTitleOrientations {
188
+ LEFT = "left",
189
+ RIGHT = "right"
190
+ }
@@ -80,6 +80,19 @@ export declare enum Bar {
80
80
  BAR_CLICK = "bar-click",
81
81
  BAR_MOUSEOUT = "bar-mouseout"
82
82
  }
83
+ /**
84
+ * enum of all boxplot graph events
85
+ */
86
+ export declare enum Boxplot {
87
+ BOX_MOUSEOVER = "box-mouseover",
88
+ BOX_MOUSEMOVE = "box-mousemove",
89
+ BOX_CLICK = "box-click",
90
+ BOX_MOUSEOUT = "box-mouseout",
91
+ OUTLIER_MOUSEOVER = "outlier-mouseover",
92
+ OUTLIER_MOUSEMOVE = "outlier-mousemove",
93
+ OUTLIER_CLICK = "outlier-click",
94
+ OUTLIER_MOUSEOUT = "outlier-mouseout"
95
+ }
83
96
  /**
84
97
  * enum of all scatter graph events
85
98
  */
@@ -0,0 +1,12 @@
1
+ import { ChartModelCartesian } from './model-cartesian-charts';
2
+ /** The charting model layer which includes mainly the chart data and options,
3
+ * as well as some misc. information to be shared among components */
4
+ export declare class BoxplotChartModel extends ChartModelCartesian {
5
+ constructor(services: any);
6
+ getBoxQuartiles(d: any): {
7
+ q_25: number;
8
+ q_50: number;
9
+ q_75: number;
10
+ };
11
+ getBoxplotData(): any[];
12
+ }
@@ -69,7 +69,7 @@ export declare class ChartModel {
69
69
  isUserProvidedColorScaleValid(): any;
70
70
  getColorClassName(configs: {
71
71
  classNameTypes: ColorClassNameTypes[];
72
- dataGroupName: string;
72
+ dataGroupName?: string;
73
73
  originalClassName?: string;
74
74
  }): string;
75
75
  /**