@carbon/charts 1.6.13 → 1.6.14
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 +8 -0
- package/axis-chart.js +1 -1
- package/axis-chart.js.map +1 -1
- package/build/src/services/scales-cartesian.d.ts +1 -1
- package/build/src/tools.d.ts +2420 -151
- package/bundle.js +1 -1
- package/chart.js +1 -1
- package/chart.js.map +1 -1
- package/charts/alluvial.js +1 -1
- package/charts/alluvial.js.map +1 -1
- package/charts/area-stacked.js +1 -1
- package/charts/area-stacked.js.map +1 -1
- package/charts/area.js +1 -1
- package/charts/area.js.map +1 -1
- package/charts/bar-grouped.js +1 -1
- package/charts/bar-grouped.js.map +1 -1
- package/charts/bar-simple.js +1 -1
- package/charts/bar-simple.js.map +1 -1
- package/charts/bar-stacked.js +1 -1
- package/charts/bar-stacked.js.map +1 -1
- package/charts/boxplot.js +1 -1
- package/charts/boxplot.js.map +1 -1
- package/charts/bubble.js +1 -1
- package/charts/bubble.js.map +1 -1
- package/charts/bullet.js +1 -1
- package/charts/bullet.js.map +1 -1
- package/charts/circle-pack.js +1 -1
- package/charts/circle-pack.js.map +1 -1
- package/charts/combo.js +1 -1
- package/charts/combo.js.map +1 -1
- package/charts/donut.js +1 -1
- package/charts/donut.js.map +1 -1
- package/charts/gauge.js +1 -1
- package/charts/gauge.js.map +1 -1
- package/charts/heatmap.js +1 -1
- package/charts/heatmap.js.map +1 -1
- package/charts/histogram.js +1 -1
- package/charts/histogram.js.map +1 -1
- package/charts/line.js +1 -1
- package/charts/line.js.map +1 -1
- package/charts/lollipop.js +1 -1
- package/charts/lollipop.js.map +1 -1
- package/charts/meter.js +1 -1
- package/charts/meter.js.map +1 -1
- package/charts/pie.js +1 -1
- package/charts/pie.js.map +1 -1
- package/charts/radar.js +1 -1
- package/charts/radar.js.map +1 -1
- package/charts/scatter.js +1 -1
- package/charts/scatter.js.map +1 -1
- package/charts/tree.js +1 -1
- package/charts/tree.js.map +1 -1
- package/charts/treemap.js +1 -1
- package/charts/treemap.js.map +1 -1
- package/charts/wordcloud.js +1 -1
- package/charts/wordcloud.js.map +1 -1
- package/components/axes/axis.js +1 -1
- package/components/axes/axis.js.map +1 -1
- package/components/axes/grid.js +1 -1
- package/components/axes/grid.js.map +1 -1
- package/components/axes/hover-axis.js +1 -1
- package/components/axes/hover-axis.js.map +1 -1
- package/components/axes/ruler-binned.js +1 -1
- package/components/axes/ruler-binned.js.map +1 -1
- package/components/axes/ruler.js +1 -1
- package/components/axes/ruler.js.map +1 -1
- package/components/axes/toolbar.js +1 -1
- package/components/axes/toolbar.js.map +1 -1
- package/components/axes/two-dimensional-axes.js +1 -1
- package/components/axes/two-dimensional-axes.js.map +1 -1
- package/components/axes/zero-line.js +1 -1
- package/components/axes/zero-line.js.map +1 -1
- package/components/axes/zoom-bar.js +1 -1
- package/components/axes/zoom-bar.js.map +1 -1
- package/components/component.js +1 -1
- package/components/component.js.map +1 -1
- package/components/essentials/color-scale-legend.js +1 -1
- package/components/essentials/color-scale-legend.js.map +1 -1
- package/components/essentials/highlights.js +1 -1
- package/components/essentials/highlights.js.map +1 -1
- package/components/essentials/legend.js +1 -1
- package/components/essentials/legend.js.map +1 -1
- package/components/essentials/modal.js +1 -1
- package/components/essentials/modal.js.map +1 -1
- package/components/essentials/threshold.js +1 -1
- package/components/essentials/threshold.js.map +1 -1
- package/components/essentials/title-meter.js +1 -1
- package/components/essentials/title-meter.js.map +1 -1
- package/components/essentials/title.js +1 -1
- package/components/essentials/title.js.map +1 -1
- package/components/essentials/tooltip-axis.js +1 -1
- package/components/essentials/tooltip-axis.js.map +1 -1
- package/components/essentials/tooltip.js +1 -1
- package/components/essentials/tooltip.js.map +1 -1
- package/components/graphs/alluvial.js +1 -1
- package/components/graphs/alluvial.js.map +1 -1
- package/components/graphs/area-stacked.js +1 -1
- package/components/graphs/area-stacked.js.map +1 -1
- package/components/graphs/area.js +1 -1
- package/components/graphs/area.js.map +1 -1
- package/components/graphs/bar-grouped.js +1 -1
- package/components/graphs/bar-grouped.js.map +1 -1
- package/components/graphs/bar-simple.js +1 -1
- package/components/graphs/bar-simple.js.map +1 -1
- package/components/graphs/bar-stacked.js +1 -1
- package/components/graphs/bar-stacked.js.map +1 -1
- package/components/graphs/bar.js +1 -1
- package/components/graphs/bar.js.map +1 -1
- package/components/graphs/boxplot.js +1 -1
- package/components/graphs/boxplot.js.map +1 -1
- package/components/graphs/bubble.js +1 -1
- package/components/graphs/bubble.js.map +1 -1
- package/components/graphs/bullet.js +1 -1
- package/components/graphs/bullet.js.map +1 -1
- package/components/graphs/circle-pack.js +1 -1
- package/components/graphs/circle-pack.js.map +1 -1
- package/components/graphs/donut.js +1 -1
- package/components/graphs/donut.js.map +1 -1
- package/components/graphs/gauge.js +1 -1
- package/components/graphs/gauge.js.map +1 -1
- package/components/graphs/heatmap.js +1 -1
- package/components/graphs/heatmap.js.map +1 -1
- package/components/graphs/histogram.js +1 -1
- package/components/graphs/histogram.js.map +1 -1
- package/components/graphs/line.js +1 -1
- package/components/graphs/line.js.map +1 -1
- package/components/graphs/lollipop.js +1 -1
- package/components/graphs/lollipop.js.map +1 -1
- package/components/graphs/meter.js +1 -1
- package/components/graphs/meter.js.map +1 -1
- package/components/graphs/pie.js +1 -1
- package/components/graphs/pie.js.map +1 -1
- package/components/graphs/radar.js +1 -1
- package/components/graphs/radar.js.map +1 -1
- package/components/graphs/scatter-stacked.js +1 -1
- package/components/graphs/scatter-stacked.js.map +1 -1
- package/components/graphs/scatter.js +1 -1
- package/components/graphs/scatter.js.map +1 -1
- package/components/graphs/skeleton-lines.js +1 -1
- package/components/graphs/skeleton-lines.js.map +1 -1
- package/components/graphs/skeleton.js +1 -1
- package/components/graphs/skeleton.js.map +1 -1
- package/components/graphs/tree.js +1 -1
- package/components/graphs/tree.js.map +1 -1
- package/components/graphs/treemap.js +1 -1
- package/components/graphs/treemap.js.map +1 -1
- package/components/graphs/wordcloud.js +1 -1
- package/components/graphs/wordcloud.js.map +1 -1
- package/components/layout/layout.js +1 -1
- package/components/layout/layout.js.map +1 -1
- package/configuration.js +1 -1
- package/configuration.js.map +1 -1
- package/model/boxplot.js +1 -1
- package/model/boxplot.js.map +1 -1
- package/model/bullet.js +1 -1
- package/model/bullet.js.map +1 -1
- package/model/cartesian-charts.js +1 -1
- package/model/cartesian-charts.js.map +1 -1
- package/model/circle-pack.js +1 -1
- package/model/circle-pack.js.map +1 -1
- package/model/heatmap.js +1 -1
- package/model/heatmap.js.map +1 -1
- package/model/meter.js +1 -1
- package/model/meter.js.map +1 -1
- package/model/model.js +1 -1
- package/model/model.js.map +1 -1
- package/model/radar.js +1 -1
- package/model/radar.js.map +1 -1
- package/model/treemap.js +1 -1
- package/model/treemap.js.map +1 -1
- package/package.json +1 -1
- package/services/essentials/dom-utils.js +1 -1
- package/services/essentials/dom-utils.js.map +1 -1
- package/services/essentials/transitions.js +1 -1
- package/services/essentials/transitions.js.map +1 -1
- package/services/scales-cartesian.js +1 -1
- package/services/scales-cartesian.js.map +1 -1
- package/services/time-series.js +1 -1
- package/services/time-series.js.map +1 -1
- package/services/zoom.js +1 -1
- package/services/zoom.js.map +1 -1
- package/tools.d.ts +141 -155
- package/tools.js +315 -344
- package/tools.js.map +1 -1
- package/tsconfig.tsbuildinfo +90 -90
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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
|
+
## [1.6.14](https://github.com/carbon-design-system/carbon-charts/compare/v1.6.13...v1.6.14) (2023-03-07)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @carbon/charts
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [1.6.13](https://github.com/carbon-design-system/carbon-charts/compare/v1.6.12...v1.6.13) (2023-03-07)
|
|
7
15
|
|
|
8
16
|
|
package/axis-chart.js
CHANGED
|
@@ -22,7 +22,7 @@ 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
24
|
import { ChartBrush, ChartClip, Modal, LayoutComponent, Legend, Threshold, Highlight, Title, AxisChartsTooltip, Spacer, Toolbar, ZoomBar, } from './components';
|
|
25
|
-
import
|
|
25
|
+
import * as Tools from './tools';
|
|
26
26
|
import { CartesianScales, Curves, Zoom } from './services';
|
|
27
27
|
var AxisChart = /** @class */ (function (_super) {
|
|
28
28
|
__extends(AxisChart, _super);
|
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,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,S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cAAc,IAAI,cAAc,EAAE;YACrC,wBAAwB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YAE/C,IAAM,oBAAoB,GAAG;gBAC5B,EAAE,EAAE,QAAQ;gBACZ,UAAU,EAAE;oBACX,IAAI,MAAM,CACT,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,QAAQ,EACb,cAAc,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CACzC;iBACD;gBACD,MAAM,EAAE,YAAY,CAAC,SAAS;aAC9B,CAAC;YAEF,wBAAwB,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;SACpD;QACD,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"]}
|
|
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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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 * as 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"]}
|
|
@@ -58,7 +58,7 @@ export declare class CartesianScales extends Service {
|
|
|
58
58
|
getMainYScaleType(): any;
|
|
59
59
|
getDomainIdentifier(datum?: any): any;
|
|
60
60
|
getRangeIdentifier(datum?: any): any;
|
|
61
|
-
extendsDomain(axisPosition: AxisPositions, domain: any):
|
|
61
|
+
extendsDomain(axisPosition: AxisPositions, domain: any): Date[] | number[];
|
|
62
62
|
protected findVerticalAxesPositions(): {
|
|
63
63
|
primary: AxisPositions;
|
|
64
64
|
secondary: AxisPositions;
|