@carbon/charts 0.33.0 → 0.34.2
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 +45 -1
- package/axis-chart.d.ts +2 -2
- package/axis-chart.js +6 -4
- package/axis-chart.js.map +1 -1
- package/build/demo/data/bar.d.ts +12 -48
- package/build/demo/data/bubble.d.ts +1 -0
- package/build/src/axis-chart.d.ts +2 -2
- package/build/src/chart.d.ts +2 -2
- package/build/src/components/axes/ruler-stacked-bar.d.ts +4 -0
- package/build/src/components/axes/ruler.d.ts +6 -1
- package/build/src/components/essentials/tooltip-axis.d.ts +4 -0
- package/build/src/components/essentials/tooltip.d.ts +4 -10
- package/build/src/components/index.d.ts +2 -4
- package/build/src/configuration.d.ts +1 -3
- package/build/src/interfaces/a11y.d.ts +2 -1
- package/build/src/interfaces/charts.d.ts +1 -3
- package/build/src/interfaces/components.d.ts +7 -52
- package/build/src/interfaces/enums.d.ts +0 -10
- package/build/src/interfaces/events.d.ts +1 -0
- package/build/src/services/scales-cartesian.d.ts +6 -1
- package/bundle.js +1 -1
- package/chart.d.ts +2 -2
- package/chart.js +2 -1
- package/chart.js.map +1 -1
- package/charts/area-stacked.js +1 -3
- package/charts/area-stacked.js.map +1 -1
- package/charts/area.js +1 -2
- package/charts/area.js.map +1 -1
- package/charts/bar-grouped.js +1 -2
- package/charts/bar-grouped.js.map +1 -1
- package/charts/bar-simple.js +1 -2
- package/charts/bar-simple.js.map +1 -1
- package/charts/bar-stacked.js +2 -2
- package/charts/bar-stacked.js.map +1 -1
- package/charts/bubble.js +1 -2
- package/charts/bubble.js.map +1 -1
- package/charts/donut.js +1 -2
- package/charts/donut.js.map +1 -1
- package/charts/gauge.js +1 -2
- package/charts/gauge.js.map +1 -1
- package/charts/line.js +1 -2
- package/charts/line.js.map +1 -1
- package/charts/pie.js +1 -4
- package/charts/pie.js.map +1 -1
- package/charts/radar.js +0 -3
- package/charts/radar.js.map +1 -1
- package/charts/scatter.js +1 -2
- package/charts/scatter.js.map +1 -1
- package/components/axes/axis.js +23 -8
- package/components/axes/axis.js.map +1 -1
- package/components/axes/grid.js.map +1 -1
- package/components/axes/ruler-stacked-bar.d.ts +4 -0
- package/components/axes/ruler-stacked-bar.js +26 -0
- package/components/axes/ruler-stacked-bar.js.map +1 -0
- package/components/axes/ruler.d.ts +6 -1
- package/components/axes/ruler.js +25 -13
- package/components/axes/ruler.js.map +1 -1
- package/components/essentials/legend.js +15 -14
- package/components/essentials/legend.js.map +1 -1
- package/components/essentials/threshold.js +2 -2
- package/components/essentials/threshold.js.map +1 -1
- package/components/essentials/title.js +10 -9
- package/components/essentials/title.js.map +1 -1
- package/components/essentials/tooltip-axis.d.ts +4 -0
- package/components/essentials/tooltip-axis.js +120 -0
- package/components/essentials/tooltip-axis.js.map +1 -0
- package/components/essentials/tooltip.d.ts +4 -10
- package/components/essentials/tooltip.js +73 -100
- package/components/essentials/tooltip.js.map +1 -1
- package/components/graphs/area-stacked.js.map +1 -1
- package/components/graphs/bar-grouped.js +5 -3
- package/components/graphs/bar-grouped.js.map +1 -1
- package/components/graphs/bar-simple.js +4 -2
- package/components/graphs/bar-simple.js.map +1 -1
- package/components/graphs/bar-stacked.js +17 -14
- package/components/graphs/bar-stacked.js.map +1 -1
- package/components/graphs/pie.js +31 -12
- package/components/graphs/pie.js.map +1 -1
- package/components/graphs/radar.js +23 -18
- package/components/graphs/radar.js.map +1 -1
- package/components/graphs/scatter-stacked.js.map +1 -1
- package/components/graphs/scatter.js +18 -13
- package/components/graphs/scatter.js.map +1 -1
- package/components/graphs/skeleton.js +2 -5
- package/components/graphs/skeleton.js.map +1 -1
- package/components/index.d.ts +2 -4
- package/components/index.js +2 -4
- package/components/index.js.map +1 -1
- package/components/layout/layout.js +3 -1
- package/components/layout/layout.js.map +1 -1
- package/configuration.d.ts +1 -3
- package/configuration.js +6 -26
- package/configuration.js.map +1 -1
- package/demo/data/bar.d.ts +12 -48
- package/demo/data/bar.js +22 -58
- package/demo/data/bar.js.map +1 -1
- package/demo/data/bubble.d.ts +1 -0
- package/demo/data/bubble.js +2 -1
- package/demo/data/bubble.js.map +1 -1
- package/demo/data/bundle.js +1 -1
- package/demo/data/index.js +1 -1
- package/demo/data/index.js.map +1 -1
- package/demo/data/line.js +5 -5
- package/demo/data/line.js.map +1 -1
- package/demo/styles.css +48 -100
- 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 +16 -16
- package/interfaces/a11y.d.ts +2 -1
- package/interfaces/a11y.js +1 -0
- package/interfaces/a11y.js.map +1 -1
- package/interfaces/charts.d.ts +1 -3
- package/interfaces/charts.js.map +1 -1
- package/interfaces/components.d.ts +7 -52
- package/interfaces/components.js.map +1 -1
- package/interfaces/enums.d.ts +0 -10
- package/interfaces/enums.js +0 -11
- package/interfaces/enums.js.map +1 -1
- package/interfaces/events.d.ts +1 -0
- package/interfaces/events.js +1 -0
- package/interfaces/events.js.map +1 -1
- package/model.js +3 -5
- package/model.js.map +1 -1
- package/package.json +1 -1
- package/services/essentials/dom-utils.js +3 -1
- package/services/essentials/dom-utils.js.map +1 -1
- package/services/scales-cartesian.d.ts +6 -1
- package/services/scales-cartesian.js +20 -1
- package/services/scales-cartesian.js.map +1 -1
- package/styles/components/_ruler.scss +0 -6
- package/styles/components/_tooltip.scss +3 -9
- package/styles/graphs/_scatter-stacked.scss +10 -0
- package/styles/graphs/index.scss +1 -0
- package/styles-g10.css +13 -25
- 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 +13 -25
- 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 +13 -25
- 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 +13 -25
- package/styles.css.map +1 -1
- package/styles.min.css +1 -1
- package/styles.min.css.map +1 -1
- package/tsconfig.tsbuildinfo +81 -138
- package/build/src/components/essentials/tooltip-bar.d.ts +0 -27
- package/build/src/components/essentials/tooltip-pie.d.ts +0 -5
- package/build/src/components/essentials/tooltip-radar.d.ts +0 -5
- package/build/src/components/essentials/tooltip-scatter.d.ts +0 -5
- package/components/essentials/tooltip-bar.d.ts +0 -27
- package/components/essentials/tooltip-bar.js +0 -193
- package/components/essentials/tooltip-bar.js.map +0 -1
- package/components/essentials/tooltip-pie.d.ts +0 -5
- package/components/essentials/tooltip-pie.js +0 -44
- package/components/essentials/tooltip-pie.js.map +0 -1
- package/components/essentials/tooltip-radar.d.ts +0 -5
- package/components/essentials/tooltip-radar.js +0 -45
- package/components/essentials/tooltip-radar.js.map +0 -1
- package/components/essentials/tooltip-scatter.d.ts +0 -5
- package/components/essentials/tooltip-scatter.js +0 -46
- package/components/essentials/tooltip-scatter.js.map +0 -1
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
|
-
|
|
6
|
+
## [0.34.2](https://github.com/carbon-design-system/carbon-charts/compare/v0.34.1...v0.34.2) (2020-07-15)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @carbon/charts
|
|
9
9
|
|
|
@@ -11,6 +11,50 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
## [0.34.1](https://github.com/carbon-design-system/carbon-charts/compare/v0.34.0...v0.34.1) (2020-07-14)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **core, react, angular, vue, svelte:** render both vertical and horizontal thresholds ([#706](https://github.com/carbon-design-system/carbon-charts/issues/706)) ([90f55d2](https://github.com/carbon-design-system/carbon-charts/commit/90f55d247f7535467eacca3477d75980e4c0e25f))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [0.34.0](https://github.com/carbon-design-system/carbon-charts/compare/v0.33.1...v0.34.0) (2020-07-14)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* add role fallback value for legend ([#702](https://github.com/carbon-design-system/carbon-charts/issues/702)) ([e272d3e](https://github.com/carbon-design-system/carbon-charts/commit/e272d3ef0edbf70318b3bb58bd1facc0d40fa568))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
|
|
35
|
+
* **core:** add title element to main SVG ([#704](https://github.com/carbon-design-system/carbon-charts/issues/704)) ([c75e1bb](https://github.com/carbon-design-system/carbon-charts/commit/c75e1bbb6fcf15120ea1513ef3ec50d30a46a11d))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
# Change Log
|
|
42
|
+
|
|
43
|
+
All notable changes to this project will be documented in this file. See
|
|
44
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
45
|
+
|
|
46
|
+
## [0.33.1](https://github.com/carbon-design-system/carbon-charts/compare/v0.33.0...v0.33.1) (2020-07-08)
|
|
47
|
+
|
|
48
|
+
### Bug Fixes
|
|
49
|
+
|
|
50
|
+
- fix bar chart tooltip data
|
|
51
|
+
([#692](https://github.com/carbon-design-system/carbon-charts/issues/692))
|
|
52
|
+
([05e4bb3](https://github.com/carbon-design-system/carbon-charts/commit/05e4bb364ac96697aefa4c2096b391fc248e2369))
|
|
53
|
+
|
|
54
|
+
# [0.33.0](https://github.com/carbon-design-system/carbon-charts/compare/v0.32.12...v0.33.0) (2020-07-07)
|
|
55
|
+
|
|
56
|
+
**Note:** Version bump only for package @carbon/charts
|
|
57
|
+
|
|
14
58
|
# Change Log
|
|
15
59
|
|
|
16
60
|
All notable changes to this project will be documented in this file. See
|
package/axis-chart.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Chart } from "./chart";
|
|
2
2
|
import { ChartConfig, AxisChartOptions } from "./interfaces/index";
|
|
3
|
-
import { LayoutComponent } from "./components/index";
|
|
3
|
+
import { LayoutComponent, AxisChartsTooltip } from "./components/index";
|
|
4
4
|
export declare class AxisChart extends Chart {
|
|
5
5
|
services: any;
|
|
6
6
|
constructor(holder: Element, chartConfigs: ChartConfig<AxisChartOptions>);
|
|
7
|
-
protected getAxisChartComponents(graphFrameComponents: any[]): LayoutComponent[];
|
|
7
|
+
protected getAxisChartComponents(graphFrameComponents: any[]): (LayoutComponent | AxisChartsTooltip)[];
|
|
8
8
|
}
|
package/axis-chart.js
CHANGED
|
@@ -20,7 +20,7 @@ var __spreadArrays = (this && this.__spreadArrays) || function () {
|
|
|
20
20
|
};
|
|
21
21
|
import { Chart } from "./chart";
|
|
22
22
|
import { LayoutDirection, LayoutGrowth, LegendOrientations, LegendPositions } from "./interfaces/index";
|
|
23
|
-
import { LayoutComponent, Legend, Title, Spacer } from "./components/index";
|
|
23
|
+
import { LayoutComponent, Legend, Title, AxisChartsTooltip, Spacer } from "./components/index";
|
|
24
24
|
import { Tools } from "./tools";
|
|
25
25
|
import { CartesianScales, Curves } from "./services/index";
|
|
26
26
|
var AxisChart = /** @class */ (function (_super) {
|
|
@@ -58,7 +58,9 @@ var AxisChart = /** @class */ (function (_super) {
|
|
|
58
58
|
y: LayoutGrowth.FIXED
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
|
-
|
|
61
|
+
// if the chart is loading but has data, don't enable legend until loading is false
|
|
62
|
+
var isDataLoading = Tools.getProperty(this.model.getOptions(), "data", "loading");
|
|
63
|
+
var isLegendEnabled = this.model.getOptions().legend.enabled !== false && !isDataLoading;
|
|
62
64
|
// Decide the position of the legend in reference to the chart
|
|
63
65
|
var fullFrameComponentDirection = LayoutDirection.COLUMN;
|
|
64
66
|
if (isLegendEnabled) {
|
|
@@ -92,8 +94,7 @@ var AxisChart = /** @class */ (function (_super) {
|
|
|
92
94
|
var fullFrameComponent = {
|
|
93
95
|
id: "full-frame",
|
|
94
96
|
components: [
|
|
95
|
-
new LayoutComponent(this.model, this.services, __spreadArrays((isLegendEnabled ? [legendComponent] : []), [
|
|
96
|
-
legendSpacerComponent,
|
|
97
|
+
new LayoutComponent(this.model, this.services, __spreadArrays((isLegendEnabled ? [legendComponent] : []), (isLegendEnabled ? [legendSpacerComponent] : []), [
|
|
97
98
|
graphFrameComponent
|
|
98
99
|
]), {
|
|
99
100
|
direction: fullFrameComponentDirection
|
|
@@ -120,6 +121,7 @@ var AxisChart = /** @class */ (function (_super) {
|
|
|
120
121
|
}
|
|
121
122
|
topLevelLayoutComponents.push(fullFrameComponent);
|
|
122
123
|
return [
|
|
124
|
+
new AxisChartsTooltip(this.model, this.services),
|
|
123
125
|
new LayoutComponent(this.model, this.services, topLevelLayoutComponents, {
|
|
124
126
|
direction: LayoutDirection.COLUMN
|
|
125
127
|
})
|
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,EACN,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,eAAe,EAGf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,eAAe,EACf,MAAM,EACN,KAAK,
|
|
1
|
+
{"version":3,"file":"axis-chart.js","sourceRoot":"","sources":["axis-chart.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EACN,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,eAAe,EAGf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,eAAe,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Q,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,AAvID,CAA+B,KAAK,GAuInC","sourcesContent":["import { Chart } from \"./chart\";\nimport {\n\tLayoutDirection,\n\tLayoutGrowth,\n\tLegendOrientations,\n\tLegendPositions,\n\tChartConfig,\n\tAxisChartOptions\n} from \"./interfaces/index\";\nimport {\n\tLayoutComponent,\n\tLegend,\n\tTitle,\n\tAxisChartsTooltip,\n\tSpacer\n} from \"./components/index\";\nimport { Tools } from \"./tools\";\n\nimport { CartesianScales, Curves } from \"./services/index\";\n\nexport class AxisChart extends Chart {\n\tservices: any = Object.assign(this.services, {\n\t\tcartesianScales: CartesianScales,\n\t\tcurves: Curves\n\t});\n\n\tconstructor(holder: Element, chartConfigs: ChartConfig<AxisChartOptions>) {\n\t\tsuper(holder, chartConfigs);\n\t}\n\n\tprotected getAxisChartComponents(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\t// if the chart is loading but has data, don't enable legend until loading is false\n\t\tconst isDataLoading = Tools.getProperty(\n\t\t\tthis.model.getOptions(),\n\t\t\t\"data\",\n\t\t\t\"loading\"\n\t\t);\n\t\tconst isLegendEnabled =\n\t\t\tthis.model.getOptions().legend.enabled !== false && !isDataLoading;\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\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 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"]}
|
package/build/demo/data/bar.d.ts
CHANGED
|
@@ -257,12 +257,9 @@ export declare const simpleBarEmptyStateData: any[];
|
|
|
257
257
|
export declare const simpleBarEmptyStateOptions: {
|
|
258
258
|
title: string;
|
|
259
259
|
axes: {
|
|
260
|
-
left: {
|
|
261
|
-
primary: boolean;
|
|
262
|
-
};
|
|
260
|
+
left: {};
|
|
263
261
|
bottom: {
|
|
264
262
|
scaleType: string;
|
|
265
|
-
secondary: boolean;
|
|
266
263
|
};
|
|
267
264
|
};
|
|
268
265
|
};
|
|
@@ -270,12 +267,9 @@ export declare const simpleBarSkeletonData: any[];
|
|
|
270
267
|
export declare const simpleBarSkeletonOptions: {
|
|
271
268
|
title: string;
|
|
272
269
|
axes: {
|
|
273
|
-
left: {
|
|
274
|
-
primary: boolean;
|
|
275
|
-
};
|
|
270
|
+
left: {};
|
|
276
271
|
bottom: {
|
|
277
272
|
scaleType: string;
|
|
278
|
-
secondary: boolean;
|
|
279
273
|
};
|
|
280
274
|
};
|
|
281
275
|
data: {
|
|
@@ -286,12 +280,9 @@ export declare const groupedBarEmptyStateData: any[];
|
|
|
286
280
|
export declare const groupedBarEmptyStateOptions: {
|
|
287
281
|
title: string;
|
|
288
282
|
axes: {
|
|
289
|
-
left: {
|
|
290
|
-
primary: boolean;
|
|
291
|
-
};
|
|
283
|
+
left: {};
|
|
292
284
|
bottom: {
|
|
293
285
|
scaleType: string;
|
|
294
|
-
secondary: boolean;
|
|
295
286
|
};
|
|
296
287
|
};
|
|
297
288
|
};
|
|
@@ -299,12 +290,9 @@ export declare const groupedBarSkeletonData: any[];
|
|
|
299
290
|
export declare const groupedBarSkeletonOptions: {
|
|
300
291
|
title: string;
|
|
301
292
|
axes: {
|
|
302
|
-
left: {
|
|
303
|
-
primary: boolean;
|
|
304
|
-
};
|
|
293
|
+
left: {};
|
|
305
294
|
bottom: {
|
|
306
295
|
scaleType: string;
|
|
307
|
-
secondary: boolean;
|
|
308
296
|
};
|
|
309
297
|
};
|
|
310
298
|
data: {
|
|
@@ -315,12 +303,9 @@ export declare const stackedBarEmptyStateData: any[];
|
|
|
315
303
|
export declare const stackedBarEmptyStateOptions: {
|
|
316
304
|
title: string;
|
|
317
305
|
axes: {
|
|
318
|
-
left: {
|
|
319
|
-
primary: boolean;
|
|
320
|
-
};
|
|
306
|
+
left: {};
|
|
321
307
|
bottom: {
|
|
322
308
|
scaleType: string;
|
|
323
|
-
secondary: boolean;
|
|
324
309
|
};
|
|
325
310
|
};
|
|
326
311
|
};
|
|
@@ -328,12 +313,9 @@ export declare const stackedBarSkeletonData: any[];
|
|
|
328
313
|
export declare const stackedBarSkeletonOptions: {
|
|
329
314
|
title: string;
|
|
330
315
|
axes: {
|
|
331
|
-
left: {
|
|
332
|
-
primary: boolean;
|
|
333
|
-
};
|
|
316
|
+
left: {};
|
|
334
317
|
bottom: {
|
|
335
318
|
scaleType: string;
|
|
336
|
-
secondary: boolean;
|
|
337
319
|
};
|
|
338
320
|
};
|
|
339
321
|
data: {
|
|
@@ -345,12 +327,9 @@ export declare const simpleHorizontalBarEmptyStateOptions: {
|
|
|
345
327
|
title: string;
|
|
346
328
|
axes: {
|
|
347
329
|
left: {
|
|
348
|
-
primary: boolean;
|
|
349
330
|
scaleType: string;
|
|
350
331
|
};
|
|
351
|
-
bottom: {
|
|
352
|
-
secondary: boolean;
|
|
353
|
-
};
|
|
332
|
+
bottom: {};
|
|
354
333
|
};
|
|
355
334
|
};
|
|
356
335
|
export declare const simpleHorizontalBarSkeletonData: any[];
|
|
@@ -358,12 +337,9 @@ export declare const simpleHorizontalBarSkeletonOptions: {
|
|
|
358
337
|
title: string;
|
|
359
338
|
axes: {
|
|
360
339
|
left: {
|
|
361
|
-
primary: boolean;
|
|
362
340
|
scaleType: string;
|
|
363
341
|
};
|
|
364
|
-
bottom: {
|
|
365
|
-
secondary: boolean;
|
|
366
|
-
};
|
|
342
|
+
bottom: {};
|
|
367
343
|
};
|
|
368
344
|
data: {
|
|
369
345
|
loading: boolean;
|
|
@@ -374,12 +350,9 @@ export declare const groupedHorizontalBarEmptyStateOptions: {
|
|
|
374
350
|
title: string;
|
|
375
351
|
axes: {
|
|
376
352
|
left: {
|
|
377
|
-
primary: boolean;
|
|
378
353
|
scaleType: string;
|
|
379
354
|
};
|
|
380
|
-
bottom: {
|
|
381
|
-
secondary: boolean;
|
|
382
|
-
};
|
|
355
|
+
bottom: {};
|
|
383
356
|
};
|
|
384
357
|
};
|
|
385
358
|
export declare const groupedHorizontalBarSkeletonData: any[];
|
|
@@ -387,12 +360,9 @@ export declare const groupedHorizontalBarSkeletonOptions: {
|
|
|
387
360
|
title: string;
|
|
388
361
|
axes: {
|
|
389
362
|
left: {
|
|
390
|
-
primary: boolean;
|
|
391
363
|
scaleType: string;
|
|
392
364
|
};
|
|
393
|
-
bottom: {
|
|
394
|
-
secondary: boolean;
|
|
395
|
-
};
|
|
365
|
+
bottom: {};
|
|
396
366
|
};
|
|
397
367
|
data: {
|
|
398
368
|
loading: boolean;
|
|
@@ -403,12 +373,9 @@ export declare const stackedHorizontalBarEmptyStateOptions: {
|
|
|
403
373
|
title: string;
|
|
404
374
|
axes: {
|
|
405
375
|
left: {
|
|
406
|
-
primary: boolean;
|
|
407
376
|
scaleType: string;
|
|
408
377
|
};
|
|
409
|
-
bottom: {
|
|
410
|
-
secondary: boolean;
|
|
411
|
-
};
|
|
378
|
+
bottom: {};
|
|
412
379
|
};
|
|
413
380
|
};
|
|
414
381
|
export declare const stackedHorizontalBarSkeletonData: any[];
|
|
@@ -416,12 +383,9 @@ export declare const stackedHorizontalBarSkeletonOptions: {
|
|
|
416
383
|
title: string;
|
|
417
384
|
axes: {
|
|
418
385
|
left: {
|
|
419
|
-
primary: boolean;
|
|
420
386
|
scaleType: string;
|
|
421
387
|
};
|
|
422
|
-
bottom: {
|
|
423
|
-
secondary: boolean;
|
|
424
|
-
};
|
|
388
|
+
bottom: {};
|
|
425
389
|
};
|
|
426
390
|
data: {
|
|
427
391
|
loading: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Chart } from "./chart";
|
|
2
2
|
import { ChartConfig, AxisChartOptions } from "./interfaces/index";
|
|
3
|
-
import { LayoutComponent } from "./components/index";
|
|
3
|
+
import { LayoutComponent, AxisChartsTooltip } from "./components/index";
|
|
4
4
|
export declare class AxisChart extends Chart {
|
|
5
5
|
services: any;
|
|
6
6
|
constructor(holder: Element, chartConfigs: ChartConfig<AxisChartOptions>);
|
|
7
|
-
protected getAxisChartComponents(graphFrameComponents: any[]): LayoutComponent[];
|
|
7
|
+
protected getAxisChartComponents(graphFrameComponents: any[]): (AxisChartsTooltip | LayoutComponent)[];
|
|
8
8
|
}
|
package/build/src/chart.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChartConfig, BaseChartOptions } from "./interfaces";
|
|
2
2
|
import { ChartModel } from "./model";
|
|
3
|
-
import { Component, LayoutComponent } from "./components";
|
|
3
|
+
import { Component, LayoutComponent, Tooltip } from "./components";
|
|
4
4
|
export declare class Chart {
|
|
5
5
|
components: Component[];
|
|
6
6
|
services: any;
|
|
@@ -10,5 +10,5 @@ export declare class Chart {
|
|
|
10
10
|
getComponents(): any[];
|
|
11
11
|
update(animate?: boolean): void;
|
|
12
12
|
destroy(): void;
|
|
13
|
-
protected getChartComponents(graphFrameComponents: any[]): LayoutComponent[];
|
|
13
|
+
protected getChartComponents(graphFrameComponents: any[]): (Tooltip | LayoutComponent)[];
|
|
14
14
|
}
|
|
@@ -5,8 +5,13 @@ export declare class Ruler extends Component {
|
|
|
5
5
|
type: string;
|
|
6
6
|
backdrop: GenericSvgSelection;
|
|
7
7
|
elementsToHighlight: GenericSvgSelection;
|
|
8
|
+
pointsWithinLine: {
|
|
9
|
+
domainValue: number;
|
|
10
|
+
originalData: any;
|
|
11
|
+
}[];
|
|
8
12
|
render(): void;
|
|
9
|
-
|
|
13
|
+
formatTooltipData(tooltipData: any): any;
|
|
14
|
+
showRuler([x, y]: [number, number]): any;
|
|
10
15
|
hideRuler(): void;
|
|
11
16
|
/**
|
|
12
17
|
* Adds the listener on the X grid to trigger multiple point tooltips along the x axis.
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import { Component } from "../component";
|
|
2
2
|
import { ChartModel } from "../../model";
|
|
3
3
|
import Position from "@carbon/utils-position";
|
|
4
|
-
import { TooltipTypes, TooltipPosition } from "../../interfaces";
|
|
5
4
|
export declare class Tooltip extends Component {
|
|
6
5
|
type: string;
|
|
7
6
|
tooltip: any;
|
|
8
7
|
positionService: Position;
|
|
9
8
|
constructor(model: ChartModel, services: any, configs?: any);
|
|
10
9
|
init(): void;
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
getItems(e: CustomEvent): any;
|
|
11
|
+
formatItems(items: any): any;
|
|
12
|
+
getTooltipHTML(e: CustomEvent): any;
|
|
13
|
+
valueFormatter(value: any): any;
|
|
13
14
|
render(): void;
|
|
14
|
-
getTooltipPosition(hoveredElement: any, type: TooltipTypes): {
|
|
15
|
-
placement: TooltipPosition;
|
|
16
|
-
position: {
|
|
17
|
-
left: number;
|
|
18
|
-
top: number;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
15
|
positionTooltip(positionOverride?: any): void;
|
|
22
16
|
}
|
|
@@ -3,10 +3,7 @@ export * from "./essentials/legend";
|
|
|
3
3
|
export * from "./essentials/threshold";
|
|
4
4
|
export * from "./essentials/title";
|
|
5
5
|
export * from "./essentials/tooltip";
|
|
6
|
-
export * from "./essentials/tooltip-
|
|
7
|
-
export * from "./essentials/tooltip-pie";
|
|
8
|
-
export * from "./essentials/tooltip-scatter";
|
|
9
|
-
export * from "./essentials/tooltip-radar";
|
|
6
|
+
export * from "./essentials/tooltip-axis";
|
|
10
7
|
export * from "./graphs/area";
|
|
11
8
|
export * from "./graphs/area-stacked";
|
|
12
9
|
export * from "./graphs/bar-simple";
|
|
@@ -26,4 +23,5 @@ export * from "./axes/two-dimensional-axes";
|
|
|
26
23
|
export * from "./axes/axis";
|
|
27
24
|
export * from "./axes/grid";
|
|
28
25
|
export * from "./axes/ruler";
|
|
26
|
+
export * from "./axes/ruler-stacked-bar";
|
|
29
27
|
export * from "./axes/zero-line";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseChartOptions, AxisChartOptions, ScatterChartOptions, LineChartOptions, BarChartOptions, StackedBarChartOptions, AreaChartOptions, PieChartOptions, GaugeChartOptions, DonutChartOptions, BubbleChartOptions, RadarChartOptions, GridOptions, TimeScaleOptions, TooltipOptions,
|
|
1
|
+
import { BaseChartOptions, AxisChartOptions, ScatterChartOptions, LineChartOptions, BarChartOptions, StackedBarChartOptions, AreaChartOptions, PieChartOptions, GaugeChartOptions, DonutChartOptions, BubbleChartOptions, RadarChartOptions, GridOptions, TimeScaleOptions, TooltipOptions, LegendOptions } from "./interfaces";
|
|
2
2
|
/**
|
|
3
3
|
* Legend options
|
|
4
4
|
*/
|
|
@@ -11,8 +11,6 @@ export declare const grid: GridOptions;
|
|
|
11
11
|
* Tooltip options
|
|
12
12
|
*/
|
|
13
13
|
export declare const baseTooltip: TooltipOptions;
|
|
14
|
-
export declare const axisChartTooltip: AxisTooltipOptions;
|
|
15
|
-
export declare const barChartTooltip: BarTooltipOptions;
|
|
16
14
|
export declare const timeScale: TimeScaleOptions;
|
|
17
15
|
export declare const options: {
|
|
18
16
|
chart: BaseChartOptions;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GaugeTypes, Statuses, ArrowDirections } from "./enums";
|
|
2
2
|
import { LegendOptions, TooltipOptions, GridOptions, AxesOptions } from "./index";
|
|
3
|
-
import {
|
|
3
|
+
import { BarOptions, StackedBarOptions } from "./components";
|
|
4
4
|
import { TimeScaleOptions } from "./axis-scales";
|
|
5
5
|
/**
|
|
6
6
|
* Base chart options common to any chart
|
|
@@ -90,14 +90,12 @@ export interface AxisChartOptions extends BaseChartOptions {
|
|
|
90
90
|
axes?: AxesOptions;
|
|
91
91
|
grid?: GridOptions;
|
|
92
92
|
timeScale?: TimeScaleOptions;
|
|
93
|
-
tooltip?: AxisTooltipOptions;
|
|
94
93
|
}
|
|
95
94
|
/**
|
|
96
95
|
* options specific to bar charts
|
|
97
96
|
*/
|
|
98
97
|
export interface BarChartOptions extends AxisChartOptions {
|
|
99
98
|
bars?: BarOptions;
|
|
100
|
-
tooltip?: BarTooltipOptions;
|
|
101
99
|
}
|
|
102
100
|
/**
|
|
103
101
|
* options specific to stacked bar charts
|
|
@@ -61,32 +61,14 @@ export interface TooltipOptions {
|
|
|
61
61
|
*/
|
|
62
62
|
customHTML?: Function;
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
64
|
+
* offset of the tooltip from the mouse position
|
|
65
65
|
*/
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
* toggles on/off datapoint tooltips.
|
|
73
|
-
*/
|
|
74
|
-
enabled?: boolean;
|
|
75
|
-
/**
|
|
76
|
-
* vertical offset for tooltip placement
|
|
77
|
-
*/
|
|
78
|
-
verticalOffset?: number;
|
|
79
|
-
};
|
|
80
|
-
title?: {
|
|
81
|
-
/**
|
|
82
|
-
* vertical offset for title tooltip placement. < 0 shifts the tooltip above title, > 0 shifts vertically down
|
|
83
|
-
*/
|
|
84
|
-
verticalOffset?: number;
|
|
85
|
-
/**
|
|
86
|
-
* max width of title tooltip relative to the width of the chart-svg (percentage should be < 1)
|
|
87
|
-
*/
|
|
88
|
-
width?: number;
|
|
89
|
-
};
|
|
66
|
+
horizontalOffset?: number;
|
|
67
|
+
/**
|
|
68
|
+
* show total of items
|
|
69
|
+
*/
|
|
70
|
+
showTotal?: boolean;
|
|
71
|
+
truncation?: TruncationOptions;
|
|
90
72
|
}
|
|
91
73
|
/**
|
|
92
74
|
* Threshold options
|
|
@@ -109,33 +91,6 @@ export interface ThresholdOptions {
|
|
|
109
91
|
*/
|
|
110
92
|
label: string;
|
|
111
93
|
}
|
|
112
|
-
/**
|
|
113
|
-
* extends tooltip options to provide support for multiple gridline tooltips
|
|
114
|
-
*/
|
|
115
|
-
export interface AxisTooltipOptions extends TooltipOptions {
|
|
116
|
-
/** options for gridline event listeners */
|
|
117
|
-
gridline?: {
|
|
118
|
-
/**
|
|
119
|
-
* controls whether the gridlines are active for tooltip support
|
|
120
|
-
*/
|
|
121
|
-
enabled?: boolean;
|
|
122
|
-
/**
|
|
123
|
-
* optional set threshold (value between 0 and 1) for active gridlines
|
|
124
|
-
*/
|
|
125
|
-
threshold?: number;
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* extends tooltip for bar tooltip
|
|
130
|
-
*/
|
|
131
|
-
export interface BarTooltipOptions extends TooltipOptions {
|
|
132
|
-
datapoint: {
|
|
133
|
-
/**
|
|
134
|
-
* padding between the bar items and the tooltip
|
|
135
|
-
*/
|
|
136
|
-
verticalOffset: number;
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
94
|
export interface GridOptions {
|
|
140
95
|
y?: {
|
|
141
96
|
numberOfTicks?: number;
|
|
@@ -54,16 +54,6 @@ export declare enum TooltipPosition {
|
|
|
54
54
|
TOP = "top",
|
|
55
55
|
BOTTOM = "bottom"
|
|
56
56
|
}
|
|
57
|
-
/**
|
|
58
|
-
* enum of tooltip types for custom tooltip event
|
|
59
|
-
*/
|
|
60
|
-
export declare enum TooltipTypes {
|
|
61
|
-
DATAPOINT = "datapoint",
|
|
62
|
-
GRIDLINE = "gridline",
|
|
63
|
-
TITLE = "title",
|
|
64
|
-
LEGEND = "legend",
|
|
65
|
-
AXISLABEL = "axislabel"
|
|
66
|
-
}
|
|
67
57
|
/**
|
|
68
58
|
* enum of all possible legend positions
|
|
69
59
|
*/
|
|
@@ -18,12 +18,17 @@ export declare class CartesianScales extends Service {
|
|
|
18
18
|
protected orientation: CartesianOrientations;
|
|
19
19
|
getDomainAxisPosition(): AxisPositions;
|
|
20
20
|
getRangeAxisPosition(): AxisPositions;
|
|
21
|
+
getAxisOptions(position: AxisPositions): any;
|
|
22
|
+
getDomainAxisOptions(): any;
|
|
23
|
+
getRangeAxisOptions(): any;
|
|
21
24
|
update(animate?: boolean): void;
|
|
22
25
|
findDomainAndRangeAxes(): void;
|
|
23
26
|
determineOrientation(): void;
|
|
24
27
|
getOrientation(): CartesianOrientations;
|
|
25
28
|
getScaleByPosition(axisPosition: AxisPositions): any;
|
|
26
29
|
getScaleTypeByPosition(axisPosition: AxisPositions): any;
|
|
30
|
+
getDomainAxisScaleType(): any;
|
|
31
|
+
getRangeAxisScaleType(): any;
|
|
27
32
|
getDomainScale(): any;
|
|
28
33
|
getRangeScale(): any;
|
|
29
34
|
getMainXAxisPosition(): AxisPositions;
|
|
@@ -35,7 +40,7 @@ export declare class CartesianScales extends Service {
|
|
|
35
40
|
getRangeValue(d: any, i: any): any;
|
|
36
41
|
getDomainIdentifier(): any;
|
|
37
42
|
getRangeIdentifier(): any;
|
|
38
|
-
/** Uses the
|
|
43
|
+
/** Uses the Y Axis to get data items associated with that value. */
|
|
39
44
|
getDataFromDomain(domainValue: any): any;
|
|
40
45
|
extendsDomain(axisPosition: AxisPositions, domain: any): number[] | Date[];
|
|
41
46
|
protected findMainVerticalAxisPosition(): AxisPositions.LEFT | AxisPositions.RIGHT;
|