@carbon/charts 0.47.0 → 0.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/axis-chart.js +2 -1
- package/axis-chart.js.map +1 -1
- package/build/demo/data/area.d.ts +33 -0
- package/build/src/components/axes/zoom-bar.d.ts +1 -0
- package/build/src/components/essentials/highlights.d.ts +13 -0
- package/build/src/components/index.d.ts +1 -0
- package/bundle.js +1 -1
- package/components/axes/zoom-bar.d.ts +1 -0
- package/components/axes/zoom-bar.js +26 -0
- package/components/axes/zoom-bar.js.map +1 -1
- package/components/essentials/highlights.d.ts +13 -0
- package/components/essentials/highlights.js +196 -0
- package/components/essentials/highlights.js.map +1 -0
- package/components/index.d.ts +1 -0
- package/components/index.js +1 -0
- package/components/index.js.map +1 -1
- package/demo/data/area.d.ts +33 -0
- package/demo/data/area.js +41 -0
- package/demo/data/area.js.map +1 -1
- package/demo/data/bundle.js +1 -1
- package/demo/data/index.js +15 -0
- package/demo/data/index.js.map +1 -1
- package/demo/styles.css +32 -0
- package/demo/styles.css.map +1 -1
- package/demo/styles.min.css +1 -1
- package/demo/styles.min.css.map +1 -1
- package/demo/tsconfig.tsbuildinfo +67 -66
- package/package.json +1 -1
- package/styles/components/_highlights.scss +6 -0
- package/styles/components/_zoom-bar.scss +5 -0
- package/styles/components/index.scss +1 -0
- package/styles-g10.css +9 -0
- package/styles-g10.css.map +1 -1
- package/styles-g10.min.css +1 -1
- package/styles-g10.min.css.map +1 -1
- package/styles-g100.css +9 -0
- package/styles-g100.css.map +1 -1
- package/styles-g100.min.css +1 -1
- package/styles-g100.min.css.map +1 -1
- package/styles-g90.css +9 -0
- package/styles-g90.css.map +1 -1
- package/styles-g90.min.css +1 -1
- package/styles-g90.min.css.map +1 -1
- package/styles.css +9 -0
- package/styles.css.map +1 -1
- package/styles.min.css +1 -1
- package/styles.min.css.map +1 -1
- package/tsconfig.tsbuildinfo +31 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.48.0](https://github.com/carbon-design-system/carbon-charts/compare/v0.47.0...v0.48.0) (2021-09-10)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **highlight:** Add highlights ([#1048](https://github.com/carbon-design-system/carbon-charts/issues/1048)) ([baa4645](https://github.com/carbon-design-system/carbon-charts/commit/baa4645c16027ab21f2d2155c79fb73cdf0d4772))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [0.47.0](https://github.com/carbon-design-system/carbon-charts/compare/v0.46.5...v0.47.0) (2021-09-08)
|
|
7
18
|
|
|
8
19
|
|
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, RenderTypes, LayoutAlignItems, } from './interfaces';
|
|
24
|
-
import { ChartBrush, ChartClip, Modal, LayoutComponent, Legend, Threshold, Title, AxisChartsTooltip, Spacer, Toolbar, ZoomBar, } from './components';
|
|
24
|
+
import { ChartBrush, ChartClip, Modal, LayoutComponent, Legend, Threshold, Highlight, 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) {
|
|
@@ -85,6 +85,7 @@ var AxisChart = /** @class */ (function (_super) {
|
|
|
85
85
|
graphFrameComponents.push(new ChartClip(this.model, this.services), new ChartBrush(this.model, this.services));
|
|
86
86
|
}
|
|
87
87
|
graphFrameComponents.push(new Threshold(this.model, this.services));
|
|
88
|
+
graphFrameComponents.push(new Highlight(this.model, this.services));
|
|
88
89
|
var graphFrameComponent = {
|
|
89
90
|
id: 'graph-frame',
|
|
90
91
|
components: graphFrameComponents,
|
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,EACV,WAAW,EACX,gBAAgB,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EACN,UAAU,EACV,SAAS,EACT,KAAK,EACL,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,EAC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B,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,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACpC,IAAI,eAAe,CAClB,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,QAAQ,EACb,wBAAwB,EACxB;gBACC,SAAS,EAAE,eAAe,CAAC,MAAM;aACjC,CACD;SACD,CAAC;IACH,CAAC;IACF,gBAAC;AAAD,CAAC,AA3MD,CAA+B,KAAK,GA2MnC","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\tRenderTypes,\n\tLayoutAlignItems,\n} from './interfaces';\nimport {\n\tChartBrush,\n\tChartClip,\n\tModal,\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?: any\n\t) {\n\t\tconst options = this.model.getOptions();\n\t\tconst isZoomBarEnabled = Tools.getProperty(\n\t\t\toptions,\n\t\t\t'zoomBar',\n\t\t\tAxisPositions.TOP,\n\t\t\t'enabled'\n\t\t);\n\t\tconst toolbarEnabled = Tools.getProperty(options, 'toolbar', 'enabled');\n\n\t\tthis.services.cartesianScales.determineAxisDuality();\n\t\tthis.services.cartesianScales.findDomainAndRangeAxes(); // need to do this before getMainXAxisPosition()\n\t\tthis.services.cartesianScales.determineOrientation();\n\n\t\tconst mainXAxisPosition = this.services.cartesianScales.getMainXAxisPosition();\n\t\tconst mainXScaleType = Tools.getProperty(\n\t\t\toptions,\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: LayoutGrowth.STRETCH,\n\t\t};\n\n\t\tconst toolbarComponent = {\n\t\t\tid: 'toolbar',\n\t\t\tcomponents: [new Toolbar(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t};\n\n\t\tconst headerComponent = {\n\t\t\tid: 'header',\n\t\t\tcomponents: [\n\t\t\t\tnew LayoutComponent(\n\t\t\t\t\tthis.model,\n\t\t\t\t\tthis.services,\n\t\t\t\t\t[\n\t\t\t\t\t\t// always add title to keep layout correct\n\t\t\t\t\t\ttitleComponent,\n\t\t\t\t\t\t...(toolbarEnabled ? [toolbarComponent] : []),\n\t\t\t\t\t],\n\t\t\t\t\t{\n\t\t\t\t\t\tdirection: LayoutDirection.ROW,\n\t\t\t\t\t\talignItems: LayoutAlignItems.CENTER,\n\t\t\t\t\t}\n\t\t\t\t),\n\t\t\t],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t};\n\n\t\tconst legendComponent = {\n\t\t\tid: 'legend',\n\t\t\tcomponents: [new Legend(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\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: LayoutGrowth.STRETCH,\n\t\t\trenderType: RenderTypes.SVG,\n\t\t};\n\n\t\tconst isLegendEnabled =\n\t\t\tTools.getProperty(configs, 'legend', 'enabled') !== false &&\n\t\t\tthis.model.getOptions().legend.enabled !== false;\n\n\t\t// Decide the position of the legend in reference to the chart\n\t\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: LayoutGrowth.PREFERRED,\n\t\t};\n\n\t\tconst fullFrameComponent = {\n\t\t\tid: 'full-frame',\n\t\t\tcomponents: [\n\t\t\t\tnew LayoutComponent(\n\t\t\t\t\tthis.model,\n\t\t\t\t\tthis.services,\n\t\t\t\t\t[\n\t\t\t\t\t\t...(isLegendEnabled ? [legendComponent] : []),\n\t\t\t\t\t\t...(isLegendEnabled ? [legendSpacerComponent] : []),\n\t\t\t\t\t\tgraphFrameComponent,\n\t\t\t\t\t],\n\t\t\t\t\t{\n\t\t\t\t\t\tdirection: fullFrameComponentDirection,\n\t\t\t\t\t}\n\t\t\t\t),\n\t\t\t],\n\t\t\tgrowth: LayoutGrowth.STRETCH,\n\t\t};\n\n\t\tconst zoomBarComponent = {\n\t\t\tid: 'zoom-bar',\n\t\t\tcomponents: [new ZoomBar(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t\trenderType: RenderTypes.SVG,\n\t\t};\n\n\t\tconst topLevelLayoutComponents = [];\n\t\t// header component is required for either title or toolbar\n\t\tif (titleAvailable || toolbarEnabled) {\n\t\t\ttopLevelLayoutComponents.push(headerComponent);\n\n\t\t\tconst titleSpacerComponent = {\n\t\t\t\tid: 'spacer',\n\t\t\t\tcomponents: [\n\t\t\t\t\tnew Spacer(\n\t\t\t\t\t\tthis.model,\n\t\t\t\t\t\tthis.services,\n\t\t\t\t\t\ttoolbarEnabled ? { size: 15 } : undefined\n\t\t\t\t\t),\n\t\t\t\t],\n\t\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t\t};\n\n\t\t\ttopLevelLayoutComponents.push(titleSpacerComponent);\n\t\t}\n\t\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 Modal(this.model, this.services),\n\t\t\tnew LayoutComponent(\n\t\t\t\tthis.model,\n\t\t\t\tthis.services,\n\t\t\t\ttopLevelLayoutComponents,\n\t\t\t\t{\n\t\t\t\t\tdirection: LayoutDirection.COLUMN,\n\t\t\t\t}\n\t\t\t),\n\t\t];\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"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,EACV,WAAW,EACX,gBAAgB,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EACN,UAAU,EACV,SAAS,EACT,KAAK,EACL,eAAe,EACf,MAAM,EACN,SAAS,EACT,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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;YACrC,wBAAwB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YAE/C,IAAM,oBAAoB,GAAG;gBAC5B,EAAE,EAAE,QAAQ;gBACZ,UAAU,EAAE;oBACX,IAAI,MAAM,CACT,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,QAAQ,EACb,cAAc,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CACzC;iBACD;gBACD,MAAM,EAAE,YAAY,CAAC,SAAS;aAC9B,CAAC;YAEF,wBAAwB,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;SACpD;QACD,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,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACpC,IAAI,eAAe,CAClB,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,QAAQ,EACb,wBAAwB,EACxB;gBACC,SAAS,EAAE,eAAe,CAAC,MAAM;aACjC,CACD;SACD,CAAC;IACH,CAAC;IACF,gBAAC;AAAD,CAAC,AA5MD,CAA+B,KAAK,GA4MnC","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\tRenderTypes,\n\tLayoutAlignItems,\n} from './interfaces';\nimport {\n\tChartBrush,\n\tChartClip,\n\tModal,\n\tLayoutComponent,\n\tLegend,\n\tThreshold,\n\tHighlight,\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?: any\n\t) {\n\t\tconst options = this.model.getOptions();\n\t\tconst isZoomBarEnabled = Tools.getProperty(\n\t\t\toptions,\n\t\t\t'zoomBar',\n\t\t\tAxisPositions.TOP,\n\t\t\t'enabled'\n\t\t);\n\t\tconst toolbarEnabled = Tools.getProperty(options, 'toolbar', 'enabled');\n\n\t\tthis.services.cartesianScales.determineAxisDuality();\n\t\tthis.services.cartesianScales.findDomainAndRangeAxes(); // need to do this before getMainXAxisPosition()\n\t\tthis.services.cartesianScales.determineOrientation();\n\n\t\tconst mainXAxisPosition = this.services.cartesianScales.getMainXAxisPosition();\n\t\tconst mainXScaleType = Tools.getProperty(\n\t\t\toptions,\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: LayoutGrowth.STRETCH,\n\t\t};\n\n\t\tconst toolbarComponent = {\n\t\t\tid: 'toolbar',\n\t\t\tcomponents: [new Toolbar(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t};\n\n\t\tconst headerComponent = {\n\t\t\tid: 'header',\n\t\t\tcomponents: [\n\t\t\t\tnew LayoutComponent(\n\t\t\t\t\tthis.model,\n\t\t\t\t\tthis.services,\n\t\t\t\t\t[\n\t\t\t\t\t\t// always add title to keep layout correct\n\t\t\t\t\t\ttitleComponent,\n\t\t\t\t\t\t...(toolbarEnabled ? [toolbarComponent] : []),\n\t\t\t\t\t],\n\t\t\t\t\t{\n\t\t\t\t\t\tdirection: LayoutDirection.ROW,\n\t\t\t\t\t\talignItems: LayoutAlignItems.CENTER,\n\t\t\t\t\t}\n\t\t\t\t),\n\t\t\t],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t};\n\n\t\tconst legendComponent = {\n\t\t\tid: 'legend',\n\t\t\tcomponents: [new Legend(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\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\t\tgraphFrameComponents.push(new Highlight(this.model, this.services));\n\n\t\tconst graphFrameComponent = {\n\t\t\tid: 'graph-frame',\n\t\t\tcomponents: graphFrameComponents,\n\t\t\tgrowth: LayoutGrowth.STRETCH,\n\t\t\trenderType: RenderTypes.SVG,\n\t\t};\n\n\t\tconst isLegendEnabled =\n\t\t\tTools.getProperty(configs, 'legend', 'enabled') !== false &&\n\t\t\tthis.model.getOptions().legend.enabled !== false;\n\n\t\t// Decide the position of the legend in reference to the chart\n\t\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: LayoutGrowth.PREFERRED,\n\t\t};\n\n\t\tconst fullFrameComponent = {\n\t\t\tid: 'full-frame',\n\t\t\tcomponents: [\n\t\t\t\tnew LayoutComponent(\n\t\t\t\t\tthis.model,\n\t\t\t\t\tthis.services,\n\t\t\t\t\t[\n\t\t\t\t\t\t...(isLegendEnabled ? [legendComponent] : []),\n\t\t\t\t\t\t...(isLegendEnabled ? [legendSpacerComponent] : []),\n\t\t\t\t\t\tgraphFrameComponent,\n\t\t\t\t\t],\n\t\t\t\t\t{\n\t\t\t\t\t\tdirection: fullFrameComponentDirection,\n\t\t\t\t\t}\n\t\t\t\t),\n\t\t\t],\n\t\t\tgrowth: LayoutGrowth.STRETCH,\n\t\t};\n\n\t\tconst zoomBarComponent = {\n\t\t\tid: 'zoom-bar',\n\t\t\tcomponents: [new ZoomBar(this.model, this.services)],\n\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t\trenderType: RenderTypes.SVG,\n\t\t};\n\n\t\tconst topLevelLayoutComponents = [];\n\t\t// header component is required for either title or toolbar\n\t\tif (titleAvailable || toolbarEnabled) {\n\t\t\ttopLevelLayoutComponents.push(headerComponent);\n\n\t\t\tconst titleSpacerComponent = {\n\t\t\t\tid: 'spacer',\n\t\t\t\tcomponents: [\n\t\t\t\t\tnew Spacer(\n\t\t\t\t\t\tthis.model,\n\t\t\t\t\t\tthis.services,\n\t\t\t\t\t\ttoolbarEnabled ? { size: 15 } : undefined\n\t\t\t\t\t),\n\t\t\t\t],\n\t\t\t\tgrowth: LayoutGrowth.PREFERRED,\n\t\t\t};\n\n\t\t\ttopLevelLayoutComponents.push(titleSpacerComponent);\n\t\t}\n\t\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 Modal(this.model, this.services),\n\t\t\tnew LayoutComponent(\n\t\t\t\tthis.model,\n\t\t\t\tthis.services,\n\t\t\t\ttopLevelLayoutComponents,\n\t\t\t\t{\n\t\t\t\t\tdirection: LayoutDirection.COLUMN,\n\t\t\t\t}\n\t\t\t),\n\t\t];\n\t}\n}\n"]}
|
|
@@ -183,6 +183,39 @@ export declare const boundedAreaTimeSeriesOptions: {
|
|
|
183
183
|
};
|
|
184
184
|
curve: string;
|
|
185
185
|
};
|
|
186
|
+
export declare const boundedAreaTimeSeriesWithHighlightsOptions: {
|
|
187
|
+
title: string;
|
|
188
|
+
legend: {
|
|
189
|
+
enabled: boolean;
|
|
190
|
+
};
|
|
191
|
+
bounds: {
|
|
192
|
+
upperBoundMapsTo: string;
|
|
193
|
+
lowerBoundMapsTo: string;
|
|
194
|
+
};
|
|
195
|
+
axes: {
|
|
196
|
+
bottom: {
|
|
197
|
+
title: string;
|
|
198
|
+
mapsTo: string;
|
|
199
|
+
scaleType: string;
|
|
200
|
+
highlights: {
|
|
201
|
+
highlightStartMapsTo: string;
|
|
202
|
+
highlightEndMapsTo: string;
|
|
203
|
+
labelMapsTo: string;
|
|
204
|
+
data: {
|
|
205
|
+
startHighlight: Date;
|
|
206
|
+
label: string;
|
|
207
|
+
endHighlight: Date;
|
|
208
|
+
}[];
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
left: {
|
|
212
|
+
mapsTo: string;
|
|
213
|
+
scaleType: string;
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
curve: string;
|
|
217
|
+
};
|
|
218
|
+
export declare const boundedAreaTimeSeriesWithHighlightsZoomOptions: any;
|
|
186
219
|
export declare const areaEmptyData: any[];
|
|
187
220
|
export declare const areaEmptyOptions: {
|
|
188
221
|
title: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Component } from '../component';
|
|
2
|
+
import { ChartModel } from '../../model/model';
|
|
3
|
+
import { RenderTypes } from '../../interfaces';
|
|
4
|
+
import Position from '@carbon/utils-position';
|
|
5
|
+
export declare class Highlight extends Component {
|
|
6
|
+
type: string;
|
|
7
|
+
renderType: RenderTypes;
|
|
8
|
+
label: any;
|
|
9
|
+
positionService: Position;
|
|
10
|
+
highlightStrokeWidth: number;
|
|
11
|
+
constructor(model: ChartModel, services: any);
|
|
12
|
+
render(animate?: boolean): void;
|
|
13
|
+
}
|
|
@@ -7,6 +7,7 @@ export * from './essentials/title-meter';
|
|
|
7
7
|
export * from './essentials/tooltip';
|
|
8
8
|
export * from './essentials/tooltip-axis';
|
|
9
9
|
export * from './essentials/canvas-chart-clip';
|
|
10
|
+
export * from './essentials/highlights';
|
|
10
11
|
export * from './graphs/area';
|
|
11
12
|
export * from './graphs/area-stacked';
|
|
12
13
|
export * from './graphs/bar-simple';
|