@carbon/charts 0.41.20 → 0.41.24
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 +28 -46
- package/axis-chart.d.ts +4 -4
- package/axis-chart.js +46 -46
- package/axis-chart.js.map +1 -1
- package/build/demo/create-codesandbox.d.ts +42 -42
- package/build/demo/data/bar.d.ts +2 -2
- package/build/demo/data/index.d.ts +13 -13
- package/build/demo/data/line.d.ts +4 -4
- package/build/demo/data/meter.d.ts +1 -1
- package/build/src/axis-chart.d.ts +4 -4
- package/build/src/chart.d.ts +3 -3
- package/build/src/charts/area-stacked.d.ts +2 -2
- package/build/src/charts/area.d.ts +2 -2
- package/build/src/charts/bar-grouped.d.ts +2 -2
- package/build/src/charts/bar-simple.d.ts +2 -2
- package/build/src/charts/bar-stacked.d.ts +2 -2
- package/build/src/charts/bubble.d.ts +2 -2
- package/build/src/charts/combo.d.ts +2 -2
- package/build/src/charts/donut.d.ts +2 -2
- package/build/src/charts/gauge.d.ts +3 -3
- package/build/src/charts/index.d.ts +16 -16
- package/build/src/charts/line.d.ts +2 -2
- package/build/src/charts/lollipop.d.ts +2 -2
- package/build/src/charts/meter.d.ts +3 -3
- package/build/src/charts/pie.d.ts +3 -3
- package/build/src/charts/radar.d.ts +2 -2
- package/build/src/charts/scatter.d.ts +2 -2
- package/build/src/charts/treemap.d.ts +2 -2
- package/build/src/components/axes/axis.d.ts +3 -3
- package/build/src/components/axes/chart-clip.d.ts +2 -2
- package/build/src/components/axes/grid-brush.d.ts +1 -1
- package/build/src/components/axes/grid.d.ts +1 -1
- package/build/src/components/axes/ruler-stacked.d.ts +1 -1
- package/build/src/components/axes/ruler.d.ts +2 -2
- package/build/src/components/axes/toolbar.d.ts +2 -2
- package/build/src/components/axes/two-dimensional-axes.d.ts +2 -2
- package/build/src/components/axes/zero-line.d.ts +1 -1
- package/build/src/components/axes/zoom-bar.d.ts +2 -2
- package/build/src/components/component.d.ts +1 -1
- package/build/src/components/essentials/legend.d.ts +1 -1
- package/build/src/components/essentials/threshold.d.ts +3 -3
- package/build/src/components/essentials/title-meter.d.ts +1 -1
- package/build/src/components/essentials/title.d.ts +1 -1
- package/build/src/components/essentials/tooltip-axis.d.ts +1 -1
- package/build/src/components/essentials/tooltip.d.ts +3 -3
- package/build/src/components/graphs/area-stacked.d.ts +1 -1
- package/build/src/components/graphs/area.d.ts +1 -1
- package/build/src/components/graphs/bar-grouped.d.ts +2 -2
- package/build/src/components/graphs/bar-simple.d.ts +1 -1
- package/build/src/components/graphs/bar-stacked.d.ts +1 -1
- package/build/src/components/graphs/bar.d.ts +1 -1
- package/build/src/components/graphs/bubble.d.ts +2 -2
- package/build/src/components/graphs/donut.d.ts +1 -1
- package/build/src/components/graphs/gauge.d.ts +1 -1
- package/build/src/components/graphs/line.d.ts +1 -1
- package/build/src/components/graphs/lollipop.d.ts +1 -1
- package/build/src/components/graphs/meter.d.ts +1 -1
- package/build/src/components/graphs/pie.d.ts +1 -1
- package/build/src/components/graphs/radar.d.ts +1 -1
- package/build/src/components/graphs/scatter-stacked.d.ts +1 -1
- package/build/src/components/graphs/scatter.d.ts +2 -2
- package/build/src/components/graphs/skeleton-lines.d.ts +1 -1
- package/build/src/components/graphs/skeleton.d.ts +1 -1
- package/build/src/components/graphs/treemap.d.ts +1 -1
- package/build/src/components/index.d.ts +36 -36
- package/build/src/components/layout/layout.d.ts +3 -3
- package/build/src/components/layout/spacer.d.ts +1 -1
- package/build/src/configuration-non-customizable.d.ts +7 -7
- package/build/src/configuration.d.ts +2 -2
- package/build/src/interfaces/axis-scales.d.ts +7 -7
- package/build/src/interfaces/charts.d.ts +11 -4
- package/build/src/interfaces/components.d.ts +3 -3
- package/build/src/interfaces/enums.d.ts +1 -1
- package/build/src/interfaces/index.d.ts +7 -7
- package/build/src/interfaces/layout.d.ts +1 -1
- package/build/src/interfaces/model.d.ts +1 -1
- package/build/src/model-cartesian-charts.d.ts +1 -1
- package/build/src/model-gauge.d.ts +1 -1
- package/build/src/model-meter.d.ts +1 -1
- package/build/src/model-pie.d.ts +1 -1
- package/build/src/model.d.ts +1 -9
- package/build/src/services/angle-utils.d.ts +1 -1
- package/build/src/services/curves.d.ts +2 -2
- package/build/src/services/essentials/dom-utils.d.ts +2 -2
- package/build/src/services/essentials/events.d.ts +1 -1
- package/build/src/services/essentials/gradient-utils.d.ts +1 -1
- package/build/src/services/essentials/transitions.d.ts +2 -2
- package/build/src/services/index.d.ts +7 -7
- package/build/src/services/scales-cartesian.d.ts +2 -2
- package/build/src/services/service.d.ts +1 -1
- package/build/src/services/time-series.d.ts +1 -1
- package/build/src/services/zoom.d.ts +2 -2
- package/build/src/tools.d.ts +2 -2
- package/build/stories/all.stories.d.ts +1 -1
- package/build/stories/tutorials/index.d.ts +11 -11
- package/build/stories/tutorials.stories.d.ts +1 -1
- package/bundle.js +1 -1
- package/chart.d.ts +3 -3
- package/chart.js +35 -35
- package/chart.js.map +1 -1
- package/charts/area-stacked.d.ts +2 -2
- package/charts/area-stacked.js +8 -8
- package/charts/area-stacked.js.map +1 -1
- package/charts/area.d.ts +2 -2
- package/charts/area.js +8 -8
- package/charts/area.js.map +1 -1
- package/charts/bar-grouped.d.ts +2 -2
- package/charts/bar-grouped.js +7 -7
- package/charts/bar-grouped.js.map +1 -1
- package/charts/bar-simple.d.ts +2 -2
- package/charts/bar-simple.js +7 -7
- package/charts/bar-simple.js.map +1 -1
- package/charts/bar-stacked.d.ts +2 -2
- package/charts/bar-stacked.js +7 -7
- package/charts/bar-stacked.js.map +1 -1
- package/charts/bubble.d.ts +2 -2
- package/charts/bubble.js +7 -7
- package/charts/bubble.js.map +1 -1
- package/charts/combo.d.ts +2 -2
- package/charts/combo.js +12 -12
- package/charts/combo.js.map +1 -1
- package/charts/donut.d.ts +2 -2
- package/charts/donut.js +7 -7
- package/charts/donut.js.map +1 -1
- package/charts/gauge.d.ts +3 -3
- package/charts/gauge.js +5 -5
- package/charts/gauge.js.map +1 -1
- package/charts/index.d.ts +16 -16
- package/charts/index.js +16 -16
- package/charts/index.js.map +1 -1
- package/charts/line.d.ts +2 -2
- package/charts/line.js +5 -5
- package/charts/line.js.map +1 -1
- package/charts/lollipop.d.ts +2 -2
- package/charts/lollipop.js +7 -7
- package/charts/lollipop.js.map +1 -1
- package/charts/meter.d.ts +3 -3
- package/charts/meter.js +18 -18
- package/charts/meter.js.map +1 -1
- package/charts/pie.d.ts +3 -3
- package/charts/pie.js +8 -8
- package/charts/pie.js.map +1 -1
- package/charts/radar.d.ts +2 -2
- package/charts/radar.js +5 -5
- package/charts/radar.js.map +1 -1
- package/charts/scatter.d.ts +2 -2
- package/charts/scatter.js +7 -7
- package/charts/scatter.js.map +1 -1
- package/charts/treemap.d.ts +2 -2
- package/charts/treemap.js +4 -4
- package/charts/treemap.js.map +1 -1
- package/components/axes/axis.d.ts +3 -3
- package/components/axes/axis.js +98 -98
- package/components/axes/axis.js.map +1 -1
- package/components/axes/chart-clip.d.ts +2 -2
- package/components/axes/chart-clip.js +9 -9
- package/components/axes/chart-clip.js.map +1 -1
- package/components/axes/grid-brush.d.ts +1 -1
- package/components/axes/grid-brush.js +32 -32
- package/components/axes/grid-brush.js.map +1 -1
- package/components/axes/grid.d.ts +1 -1
- package/components/axes/grid.js +34 -34
- package/components/axes/grid.js.map +1 -1
- package/components/axes/ruler-stacked.d.ts +1 -1
- package/components/axes/ruler-stacked.js +5 -5
- package/components/axes/ruler-stacked.js.map +1 -1
- package/components/axes/ruler.d.ts +2 -2
- package/components/axes/ruler.js +36 -36
- package/components/axes/ruler.js.map +1 -1
- package/components/axes/toolbar.d.ts +2 -2
- package/components/axes/toolbar.js +85 -85
- package/components/axes/toolbar.js.map +1 -1
- package/components/axes/two-dimensional-axes.d.ts +2 -2
- package/components/axes/two-dimensional-axes.js +13 -13
- package/components/axes/two-dimensional-axes.js.map +1 -1
- package/components/axes/zero-line.d.ts +1 -1
- package/components/axes/zero-line.js +12 -12
- package/components/axes/zero-line.js.map +1 -1
- package/components/axes/zoom-bar.d.ts +2 -2
- package/components/axes/zoom-bar.js +114 -114
- package/components/axes/zoom-bar.js.map +1 -1
- package/components/component.d.ts +1 -1
- package/components/component.js +13 -13
- package/components/component.js.map +1 -1
- package/components/essentials/legend.d.ts +1 -1
- package/components/essentials/legend.js +95 -92
- package/components/essentials/legend.js.map +1 -1
- package/components/essentials/threshold.d.ts +3 -3
- package/components/essentials/threshold.js +39 -39
- package/components/essentials/threshold.js.map +1 -1
- package/components/essentials/title-meter.d.ts +1 -1
- package/components/essentials/title-meter.js +42 -42
- package/components/essentials/title-meter.js.map +1 -1
- package/components/essentials/title.d.ts +1 -1
- package/components/essentials/title.js +19 -19
- package/components/essentials/title.js.map +1 -1
- package/components/essentials/tooltip-axis.d.ts +1 -1
- package/components/essentials/tooltip-axis.js +23 -23
- package/components/essentials/tooltip-axis.js.map +1 -1
- package/components/essentials/tooltip.d.ts +3 -3
- package/components/essentials/tooltip.js +31 -31
- package/components/essentials/tooltip.js.map +1 -1
- package/components/graphs/area-stacked.d.ts +1 -1
- package/components/graphs/area-stacked.js +28 -29
- package/components/graphs/area-stacked.js.map +1 -1
- package/components/graphs/area.d.ts +1 -1
- package/components/graphs/area.js +62 -57
- package/components/graphs/area.js.map +1 -1
- package/components/graphs/bar-grouped.d.ts +2 -2
- package/components/graphs/bar-grouped.js +56 -56
- package/components/graphs/bar-grouped.js.map +1 -1
- package/components/graphs/bar-simple.d.ts +1 -1
- package/components/graphs/bar-simple.js +45 -45
- package/components/graphs/bar-simple.js.map +1 -1
- package/components/graphs/bar-stacked.d.ts +1 -1
- package/components/graphs/bar-stacked.js +50 -51
- package/components/graphs/bar-stacked.js.map +1 -1
- package/components/graphs/bar.d.ts +1 -1
- package/components/graphs/bar.js +4 -4
- package/components/graphs/bar.js.map +1 -1
- package/components/graphs/bubble.d.ts +2 -2
- package/components/graphs/bubble.js +19 -19
- package/components/graphs/bubble.js.map +1 -1
- package/components/graphs/donut.d.ts +1 -1
- package/components/graphs/donut.js +20 -20
- package/components/graphs/donut.js.map +1 -1
- package/components/graphs/gauge.d.ts +1 -1
- package/components/graphs/gauge.js +89 -87
- package/components/graphs/gauge.js.map +1 -1
- package/components/graphs/line.d.ts +1 -1
- package/components/graphs/line.js +33 -33
- package/components/graphs/line.js.map +1 -1
- package/components/graphs/lollipop.d.ts +1 -1
- package/components/graphs/lollipop.js +32 -32
- package/components/graphs/lollipop.js.map +1 -1
- package/components/graphs/meter.d.ts +1 -1
- package/components/graphs/meter.js +39 -39
- package/components/graphs/meter.js.map +1 -1
- package/components/graphs/pie.d.ts +1 -1
- package/components/graphs/pie.js +102 -100
- package/components/graphs/pie.js.map +1 -1
- package/components/graphs/radar.d.ts +1 -1
- package/components/graphs/radar.js +180 -180
- package/components/graphs/radar.js.map +1 -1
- package/components/graphs/scatter-stacked.d.ts +1 -1
- package/components/graphs/scatter-stacked.js +22 -22
- package/components/graphs/scatter-stacked.js.map +1 -1
- package/components/graphs/scatter.d.ts +2 -2
- package/components/graphs/scatter.js +67 -66
- package/components/graphs/scatter.js.map +1 -1
- package/components/graphs/skeleton-lines.d.ts +1 -1
- package/components/graphs/skeleton-lines.js +27 -27
- package/components/graphs/skeleton-lines.js.map +1 -1
- package/components/graphs/skeleton.d.ts +1 -1
- package/components/graphs/skeleton.js +85 -85
- package/components/graphs/skeleton.js.map +1 -1
- package/components/graphs/treemap.d.ts +1 -1
- package/components/graphs/treemap.js +82 -82
- package/components/graphs/treemap.js.map +1 -1
- package/components/index.d.ts +36 -36
- package/components/index.js +36 -36
- package/components/index.js.map +1 -1
- package/components/layout/layout.d.ts +3 -3
- package/components/layout/layout.js +28 -28
- package/components/layout/layout.js.map +1 -1
- package/components/layout/spacer.d.ts +1 -1
- package/components/layout/spacer.js +10 -10
- package/components/layout/spacer.js.map +1 -1
- package/configuration-non-customizable.d.ts +7 -7
- package/configuration-non-customizable.js +37 -37
- package/configuration-non-customizable.js.map +1 -1
- package/configuration.d.ts +2 -2
- package/configuration.js +81 -78
- package/configuration.js.map +1 -1
- package/demo/create-codesandbox.d.ts +42 -42
- package/demo/create-codesandbox.js +100 -100
- package/demo/create-codesandbox.js.map +1 -1
- package/demo/data/area.js +220 -190
- package/demo/data/area.js.map +1 -1
- package/demo/data/bar.d.ts +2 -2
- package/demo/data/bar.js +302 -302
- package/demo/data/bar.js.map +1 -1
- package/demo/data/bubble.js +108 -108
- package/demo/data/bubble.js.map +1 -1
- package/demo/data/combo.js +323 -323
- package/demo/data/combo.js.map +1 -1
- package/demo/data/donut.js +19 -19
- package/demo/data/donut.js.map +1 -1
- package/demo/data/gauge.js +20 -20
- package/demo/data/gauge.js.map +1 -1
- package/demo/data/high-scale.js +3 -3
- package/demo/data/high-scale.js.map +1 -1
- package/demo/data/index.d.ts +13 -13
- package/demo/data/index.js +299 -299
- package/demo/data/index.js.map +1 -1
- package/demo/data/line.d.ts +4 -4
- package/demo/data/line.js +332 -332
- package/demo/data/line.js.map +1 -1
- package/demo/data/lollipop.js +19 -19
- package/demo/data/lollipop.js.map +1 -1
- package/demo/data/meter.d.ts +1 -1
- package/demo/data/meter.js +22 -22
- package/demo/data/meter.js.map +1 -1
- package/demo/data/pie.js +17 -17
- package/demo/data/pie.js.map +1 -1
- package/demo/data/radar.js +84 -84
- package/demo/data/radar.js.map +1 -1
- package/demo/data/scatter.js +125 -125
- package/demo/data/scatter.js.map +1 -1
- package/demo/data/step.js +11 -11
- package/demo/data/step.js.map +1 -1
- package/demo/data/time-series-axis.js +164 -164
- package/demo/data/time-series-axis.js.map +1 -1
- package/demo/data/toolbar.js +15 -15
- package/demo/data/toolbar.js.map +1 -1
- package/demo/data/treemap.js +63 -63
- package/demo/data/treemap.js.map +1 -1
- package/demo/data/zoom-bar.js +65 -65
- package/demo/data/zoom-bar.js.map +1 -1
- package/demo/styles.css +1 -1
- package/demo/styles.min.css +1 -1
- package/demo/tsconfig.tsbuildinfo +45 -45
- package/index.d.ts +3 -3
- package/index.js +3 -3
- package/index.js.map +1 -1
- package/interfaces/a11y.js.map +1 -1
- package/interfaces/axis-scales.d.ts +7 -7
- package/interfaces/axis-scales.js.map +1 -1
- package/interfaces/charts.d.ts +11 -4
- package/interfaces/charts.js.map +1 -1
- package/interfaces/components.d.ts +3 -3
- package/interfaces/components.js.map +1 -1
- package/interfaces/enums.d.ts +1 -1
- package/interfaces/enums.js +1 -1
- package/interfaces/enums.js.map +1 -1
- package/interfaces/events.js.map +1 -1
- package/interfaces/index.d.ts +7 -7
- package/interfaces/index.js +2 -2
- package/interfaces/index.js.map +1 -1
- package/interfaces/layout.d.ts +1 -1
- package/interfaces/layout.js.map +1 -1
- package/interfaces/model.d.ts +1 -1
- package/interfaces/model.js.map +1 -1
- package/model-cartesian-charts.d.ts +1 -1
- package/model-cartesian-charts.js +7 -7
- package/model-cartesian-charts.js.map +1 -1
- package/model-gauge.d.ts +1 -1
- package/model-gauge.js +2 -2
- package/model-gauge.js.map +1 -1
- package/model-meter.d.ts +1 -1
- package/model-meter.js +7 -7
- package/model-meter.js.map +1 -1
- package/model-pie.d.ts +1 -1
- package/model-pie.js +1 -1
- package/model-pie.js.map +1 -1
- package/model.d.ts +1 -9
- package/model.js +31 -42
- package/model.js.map +1 -1
- package/package.json +2 -3
- package/polyfills.js +9 -9
- package/polyfills.js.map +1 -1
- package/services/angle-utils.d.ts +1 -1
- package/services/angle-utils.js +9 -9
- package/services/angle-utils.js.map +1 -1
- package/services/curves.d.ts +2 -2
- package/services/curves.js +6 -6
- package/services/curves.js.map +1 -1
- package/services/essentials/dom-utils.d.ts +2 -2
- package/services/essentials/dom-utils.js +37 -37
- package/services/essentials/dom-utils.js.map +1 -1
- package/services/essentials/events.d.ts +1 -1
- package/services/essentials/events.js +3 -3
- package/services/essentials/events.js.map +1 -1
- package/services/essentials/gradient-utils.d.ts +1 -1
- package/services/essentials/gradient-utils.js +25 -25
- package/services/essentials/gradient-utils.js.map +1 -1
- package/services/essentials/transitions.d.ts +2 -2
- package/services/essentials/transitions.js +8 -8
- package/services/essentials/transitions.js.map +1 -1
- package/services/index.d.ts +7 -7
- package/services/index.js +7 -7
- package/services/index.js.map +1 -1
- package/services/scales-cartesian.d.ts +2 -2
- package/services/scales-cartesian.js +57 -60
- package/services/scales-cartesian.js.map +1 -1
- package/services/service.d.ts +1 -1
- package/services/service.js.map +1 -1
- package/services/time-series.d.ts +1 -1
- package/services/time-series.js +27 -27
- package/services/time-series.js.map +1 -1
- package/services/zoom.d.ts +2 -2
- package/services/zoom.js +20 -20
- package/services/zoom.js.map +1 -1
- package/styles/_type.scss +7 -7
- package/styles/color-palatte.scss +218 -218
- package/styles/colors.scss +3 -3
- package/styles/components/_axis.scss +5 -5
- package/styles/components/_ruler.scss +2 -2
- package/styles/components/_threshold.scss +1 -1
- package/styles/components/_title.scss +3 -3
- package/styles/components/_toolbar.scss +1 -1
- package/styles/components/_tooltip.scss +6 -6
- package/styles/components/index.scss +16 -16
- package/styles/graphs/_bubble.scss +1 -1
- package/styles/graphs/_radar.scss +2 -2
- package/styles/graphs/_scatter.scss +1 -1
- package/styles/graphs/_treemap.scss +1 -1
- package/styles/graphs/index.scss +9 -9
- package/styles/styles-g10.scss +2 -2
- package/styles/styles-g100.scss +2 -2
- package/styles/styles-g90.scss +2 -2
- package/styles/styles-white.scss +2 -2
- package/styles/styles.scss +10 -10
- package/tools.d.ts +2 -2
- package/tools.js +26 -26
- package/tools.js.map +1 -1
- package/tsconfig.tsbuildinfo +173 -173
package/chart.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ChartConfig, BaseChartOptions } from
|
|
2
|
-
import { ChartModel } from
|
|
3
|
-
import { Component, LayoutComponent, Tooltip } from
|
|
1
|
+
import { ChartConfig, BaseChartOptions } from './interfaces';
|
|
2
|
+
import { ChartModel } from './model';
|
|
3
|
+
import { Component, LayoutComponent, Tooltip } from './components';
|
|
4
4
|
export declare class Chart {
|
|
5
5
|
components: Component[];
|
|
6
6
|
services: any;
|
package/chart.js
CHANGED
|
@@ -6,20 +6,20 @@ var __spreadArrays = (this && this.__spreadArrays) || function () {
|
|
|
6
6
|
return r;
|
|
7
7
|
};
|
|
8
8
|
// Internal Imports
|
|
9
|
-
import { LayoutGrowth, LayoutDirection, LegendOrientations, Events as ChartEvents } from
|
|
9
|
+
import { LayoutGrowth, LayoutDirection, LegendOrientations, Events as ChartEvents, } from './interfaces';
|
|
10
10
|
// Misc
|
|
11
|
-
import { ChartModel } from
|
|
12
|
-
import { Title, Legend, LayoutComponent, Tooltip, Spacer } from
|
|
13
|
-
import { Tools } from
|
|
11
|
+
import { ChartModel } from './model';
|
|
12
|
+
import { Title, Legend, LayoutComponent, Tooltip, Spacer, } from './components';
|
|
13
|
+
import { Tools } from './tools';
|
|
14
14
|
// Services
|
|
15
|
-
import { DOMUtils, Events, GradientUtils, Transitions } from
|
|
15
|
+
import { DOMUtils, Events, GradientUtils, Transitions } from './services/index';
|
|
16
16
|
var Chart = /** @class */ (function () {
|
|
17
17
|
function Chart(holder, chartConfigs) {
|
|
18
18
|
this.services = {
|
|
19
19
|
domUtils: DOMUtils,
|
|
20
20
|
events: Events,
|
|
21
21
|
gradientUtils: GradientUtils,
|
|
22
|
-
transitions: Transitions
|
|
22
|
+
transitions: Transitions,
|
|
23
23
|
};
|
|
24
24
|
this.model = new ChartModel(this.services);
|
|
25
25
|
}
|
|
@@ -35,7 +35,7 @@ var Chart = /** @class */ (function () {
|
|
|
35
35
|
});
|
|
36
36
|
// Call update() when model has been updated
|
|
37
37
|
this.services.events.addEventListener(ChartEvents.Model.UPDATE, function (e) {
|
|
38
|
-
var animate = !!Tools.getProperty(e,
|
|
38
|
+
var animate = !!Tools.getProperty(e, 'detail', 'animate');
|
|
39
39
|
_this.update(animate);
|
|
40
40
|
});
|
|
41
41
|
// Set model data & options
|
|
@@ -48,7 +48,7 @@ var Chart = /** @class */ (function () {
|
|
|
48
48
|
this.update();
|
|
49
49
|
};
|
|
50
50
|
Chart.prototype.getComponents = function () {
|
|
51
|
-
console.error(
|
|
51
|
+
console.error('getComponents() method is not implemented');
|
|
52
52
|
return null;
|
|
53
53
|
};
|
|
54
54
|
Chart.prototype.update = function (animate) {
|
|
@@ -86,86 +86,86 @@ var Chart = /** @class */ (function () {
|
|
|
86
86
|
};
|
|
87
87
|
Chart.prototype.getChartComponents = function (graphFrameComponents) {
|
|
88
88
|
var titleComponent = {
|
|
89
|
-
id:
|
|
89
|
+
id: 'title',
|
|
90
90
|
components: [new Title(this.model, this.services)],
|
|
91
91
|
growth: {
|
|
92
92
|
x: LayoutGrowth.PREFERRED,
|
|
93
|
-
y: LayoutGrowth.FIXED
|
|
94
|
-
}
|
|
93
|
+
y: LayoutGrowth.FIXED,
|
|
94
|
+
},
|
|
95
95
|
};
|
|
96
96
|
var legendComponent = {
|
|
97
|
-
id:
|
|
97
|
+
id: 'legend',
|
|
98
98
|
components: [new Legend(this.model, this.services)],
|
|
99
99
|
growth: {
|
|
100
100
|
x: LayoutGrowth.PREFERRED,
|
|
101
|
-
y: LayoutGrowth.FIXED
|
|
102
|
-
}
|
|
101
|
+
y: LayoutGrowth.FIXED,
|
|
102
|
+
},
|
|
103
103
|
};
|
|
104
104
|
var graphFrameComponent = {
|
|
105
|
-
id:
|
|
105
|
+
id: 'graph-frame',
|
|
106
106
|
components: graphFrameComponents,
|
|
107
107
|
growth: {
|
|
108
108
|
x: LayoutGrowth.STRETCH,
|
|
109
|
-
y: LayoutGrowth.FIXED
|
|
110
|
-
}
|
|
109
|
+
y: LayoutGrowth.FIXED,
|
|
110
|
+
},
|
|
111
111
|
};
|
|
112
112
|
var isLegendEnabled = this.model.getOptions().legend.enabled !== false;
|
|
113
113
|
// TODORF - REUSE BETWEEN AXISCHART & CHART
|
|
114
114
|
// Decide the position of the legend in reference to the chart
|
|
115
115
|
var fullFrameComponentDirection = LayoutDirection.COLUMN;
|
|
116
116
|
if (isLegendEnabled) {
|
|
117
|
-
var legendPosition = Tools.getProperty(this.model.getOptions(),
|
|
118
|
-
if (legendPosition ===
|
|
117
|
+
var legendPosition = Tools.getProperty(this.model.getOptions(), 'legend', 'position');
|
|
118
|
+
if (legendPosition === 'left') {
|
|
119
119
|
fullFrameComponentDirection = LayoutDirection.ROW;
|
|
120
120
|
if (!this.model.getOptions().legend.orientation) {
|
|
121
121
|
this.model.getOptions().legend.orientation =
|
|
122
122
|
LegendOrientations.VERTICAL;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
else if (legendPosition ===
|
|
125
|
+
else if (legendPosition === 'right') {
|
|
126
126
|
fullFrameComponentDirection = LayoutDirection.ROW_REVERSE;
|
|
127
127
|
if (!this.model.getOptions().legend.orientation) {
|
|
128
128
|
this.model.getOptions().legend.orientation =
|
|
129
129
|
LegendOrientations.VERTICAL;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
else if (legendPosition ===
|
|
132
|
+
else if (legendPosition === 'bottom') {
|
|
133
133
|
fullFrameComponentDirection = LayoutDirection.COLUMN_REVERSE;
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
var legendSpacerComponent = {
|
|
137
|
-
id:
|
|
137
|
+
id: 'spacer',
|
|
138
138
|
components: [new Spacer(this.model, this.services)],
|
|
139
139
|
growth: {
|
|
140
140
|
x: LayoutGrowth.PREFERRED,
|
|
141
|
-
y: LayoutGrowth.FIXED
|
|
142
|
-
}
|
|
141
|
+
y: LayoutGrowth.FIXED,
|
|
142
|
+
},
|
|
143
143
|
};
|
|
144
144
|
var fullFrameComponent = {
|
|
145
|
-
id:
|
|
145
|
+
id: 'full-frame',
|
|
146
146
|
components: [
|
|
147
147
|
new LayoutComponent(this.model, this.services, __spreadArrays((isLegendEnabled ? [legendComponent] : []), (isLegendEnabled ? [legendSpacerComponent] : []), [
|
|
148
|
-
graphFrameComponent
|
|
148
|
+
graphFrameComponent,
|
|
149
149
|
]), {
|
|
150
|
-
direction: fullFrameComponentDirection
|
|
151
|
-
})
|
|
150
|
+
direction: fullFrameComponentDirection,
|
|
151
|
+
}),
|
|
152
152
|
],
|
|
153
153
|
growth: {
|
|
154
154
|
x: LayoutGrowth.STRETCH,
|
|
155
|
-
y: LayoutGrowth.FIXED
|
|
156
|
-
}
|
|
155
|
+
y: LayoutGrowth.FIXED,
|
|
156
|
+
},
|
|
157
157
|
};
|
|
158
158
|
// Add chart title if it exists
|
|
159
159
|
var topLevelLayoutComponents = [];
|
|
160
160
|
if (this.model.getOptions().title) {
|
|
161
161
|
topLevelLayoutComponents.push(titleComponent);
|
|
162
162
|
var titleSpacerComponent = {
|
|
163
|
-
id:
|
|
163
|
+
id: 'spacer',
|
|
164
164
|
components: [new Spacer(this.model, this.services)],
|
|
165
165
|
growth: {
|
|
166
166
|
x: LayoutGrowth.PREFERRED,
|
|
167
|
-
y: LayoutGrowth.FIXED
|
|
168
|
-
}
|
|
167
|
+
y: LayoutGrowth.FIXED,
|
|
168
|
+
},
|
|
169
169
|
};
|
|
170
170
|
topLevelLayoutComponents.push(titleSpacerComponent);
|
|
171
171
|
}
|
|
@@ -173,8 +173,8 @@ var Chart = /** @class */ (function () {
|
|
|
173
173
|
return [
|
|
174
174
|
new Tooltip(this.model, this.services),
|
|
175
175
|
new LayoutComponent(this.model, this.services, topLevelLayoutComponents, {
|
|
176
|
-
direction: LayoutDirection.COLUMN
|
|
177
|
-
})
|
|
176
|
+
direction: LayoutDirection.COLUMN,
|
|
177
|
+
}),
|
|
178
178
|
];
|
|
179
179
|
};
|
|
180
180
|
return Chart;
|
package/chart.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart.js","sourceRoot":"","sources":["chart.ts"],"names":[],"mappings":";;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAGN,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,MAAM,IAAI,WAAW,EACrB,MAAM,cAAc,CAAC;AAEtB,OAAO;AACP,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAEN,KAAK,EACL,MAAM,EACN,eAAe,EACf,OAAO,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AwB,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;SACpD;QACD,wBAAwB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAElD,OAAO;YACN,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACtC,IAAI,eAAe,CAClB,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,QAAQ,EACb,wBAAwB,EACxB;gBACC,SAAS,EAAE,eAAe,CAAC,MAAM;aACjC,CACD;SACD,CAAC;IACH,CAAC;IACF,YAAC;AAAD,CAAC,AAnND,IAmNC","sourcesContent":["// Internal Imports\nimport {\n\tChartConfig,\n\tBaseChartOptions,\n\tLayoutGrowth,\n\tLayoutDirection,\n\tLegendOrientations,\n\tEvents as ChartEvents\n} from \"./interfaces\";\n\n// Misc\nimport { ChartModel } from \"./model\";\nimport {\n\tComponent,\n\tTitle,\n\tLegend,\n\tLayoutComponent,\n\tTooltip,\n\tSpacer\n} from \"./components\";\nimport { Tools } from \"./tools\";\n\n// Services\nimport { DOMUtils, Events, GradientUtils, Transitions } from \"./services/index\";\n\nexport class Chart {\n\tcomponents: Component[];\n\tservices: any = {\n\t\tdomUtils: DOMUtils,\n\t\tevents: Events,\n\t\tgradientUtils: GradientUtils,\n\t\ttransitions: Transitions\n\t};\n\tmodel: ChartModel = new ChartModel(this.services);\n\n\tconstructor(holder: Element, chartConfigs: ChartConfig<BaseChartOptions>) {}\n\n\t// Contains the code that uses properties that are overridable by the super-class\n\tinit(holder: Element, chartConfigs: ChartConfig<BaseChartOptions>) {\n\t\t// Store the holder in the model\n\t\tthis.model.set({ holder }, { skipUpdate: true });\n\n\t\t// Initialize all services\n\t\tObject.keys(this.services).forEach((serviceName) => {\n\t\t\tconst serviceObj = this.services[serviceName];\n\t\t\tthis.services[serviceName] = new serviceObj(\n\t\t\t\tthis.model,\n\t\t\t\tthis.services\n\t\t\t);\n\t\t});\n\n\t\t// Call update() when model has been updated\n\t\tthis.services.events.addEventListener(ChartEvents.Model.UPDATE, (e) => {\n\t\t\tconst animate = !!Tools.getProperty(e, \"detail\", \"animate\");\n\t\t\tthis.update(animate);\n\t\t});\n\n\t\t// Set model data & options\n\t\tthis.model.setData(chartConfigs.data);\n\n\t\t// Set chart resize event listener\n\t\tthis.services.events.addEventListener(ChartEvents.Chart.RESIZE, () => {\n\t\t\tthis.update(false);\n\t\t});\n\n\t\tthis.components = this.getComponents();\n\n\t\tthis.update();\n\t}\n\n\tgetComponents(): any[] {\n\t\tconsole.error(\"getComponents() method is not implemented\");\n\n\t\treturn null;\n\t}\n\n\tupdate(animate = true) {\n\t\tif (!this.components) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Update all services\n\t\tObject.keys(this.services).forEach((serviceName) => {\n\t\t\tconst serviceObj = this.services[serviceName];\n\t\t\tserviceObj.update();\n\t\t});\n\n\t\t// Render all components\n\t\tthis.components.forEach((component) => component.render(animate));\n\n\t\t// Asynchronously dispatch a \"render-finished\" event\n\t\t// This is needed because of d3-transitions\n\t\t// Since at the start of the transition\n\t\t// Elements do not hold their final size or position\n\t\tconst pendingTransitions = this.services.transitions.getPendingTransitions();\n\t\tconst promises = Object.keys(pendingTransitions).map((transitionID) => {\n\t\t\tconst transition = pendingTransitions[transitionID];\n\t\t\treturn transition.end().catch((e) => e); // Skip rejects since we don't care about those;\n\t\t});\n\n\t\tPromise.all(promises).then(() =>\n\t\t\tthis.services.events.dispatchEvent(\n\t\t\t\tChartEvents.Chart.RENDER_FINISHED\n\t\t\t)\n\t\t);\n\t}\n\n\tdestroy() {\n\t\t// Call the destroy() method on all components\n\t\tthis.components.forEach((component) => component.destroy());\n\n\t\t// Remove the chart holder\n\t\tthis.services.domUtils.getHolder().remove();\n\n\t\tthis.model.set({ destroyed: true }, { skipUpdate: true });\n\t}\n\n\tprotected getChartComponents(graphFrameComponents: any[]) {\n\t\tconst titleComponent = {\n\t\t\tid: \"title\",\n\t\t\tcomponents: [new Title(this.model, this.services)],\n\t\t\tgrowth: {\n\t\t\t\tx: LayoutGrowth.PREFERRED,\n\t\t\t\ty: LayoutGrowth.FIXED\n\t\t\t}\n\t\t};\n\n\t\tconst legendComponent = {\n\t\t\tid: \"legend\",\n\t\t\tcomponents: [new Legend(this.model, this.services)],\n\t\t\tgrowth: {\n\t\t\t\tx: LayoutGrowth.PREFERRED,\n\t\t\t\ty: LayoutGrowth.FIXED\n\t\t\t}\n\t\t};\n\n\t\tconst graphFrameComponent = {\n\t\t\tid: \"graph-frame\",\n\t\t\tcomponents: graphFrameComponents,\n\t\t\tgrowth: {\n\t\t\t\tx: LayoutGrowth.STRETCH,\n\t\t\t\ty: LayoutGrowth.FIXED\n\t\t\t}\n\t\t};\n\n\t\tconst isLegendEnabled =\n\t\t\tthis.model.getOptions().legend.enabled !== false;\n\t\t// TODORF - REUSE BETWEEN AXISCHART & CHART\n\t\t// Decide the position of the legend in reference to the chart\n\t\tlet fullFrameComponentDirection = LayoutDirection.COLUMN;\n\t\tif (isLegendEnabled) {\n\t\t\tconst legendPosition = Tools.getProperty(\n\t\t\t\tthis.model.getOptions(),\n\t\t\t\t\"legend\",\n\t\t\t\t\"position\"\n\t\t\t);\n\t\t\tif (legendPosition === \"left\") {\n\t\t\t\tfullFrameComponentDirection = LayoutDirection.ROW;\n\n\t\t\t\tif (!this.model.getOptions().legend.orientation) {\n\t\t\t\t\tthis.model.getOptions().legend.orientation =\n\t\t\t\t\t\tLegendOrientations.VERTICAL;\n\t\t\t\t}\n\t\t\t} else if (legendPosition === \"right\") {\n\t\t\t\tfullFrameComponentDirection = LayoutDirection.ROW_REVERSE;\n\n\t\t\t\tif (!this.model.getOptions().legend.orientation) {\n\t\t\t\t\tthis.model.getOptions().legend.orientation =\n\t\t\t\t\t\tLegendOrientations.VERTICAL;\n\t\t\t\t}\n\t\t\t} else if (legendPosition === \"bottom\") {\n\t\t\t\tfullFrameComponentDirection = LayoutDirection.COLUMN_REVERSE;\n\t\t\t}\n\t\t}\n\n\t\tconst legendSpacerComponent = {\n\t\t\tid: \"spacer\",\n\t\t\tcomponents: [new Spacer(this.model, this.services)],\n\t\t\tgrowth: {\n\t\t\t\tx: LayoutGrowth.PREFERRED,\n\t\t\t\ty: LayoutGrowth.FIXED\n\t\t\t}\n\t\t};\n\n\t\tconst fullFrameComponent = {\n\t\t\tid: \"full-frame\",\n\t\t\tcomponents: [\n\t\t\t\tnew LayoutComponent(\n\t\t\t\t\tthis.model,\n\t\t\t\t\tthis.services,\n\t\t\t\t\t[\n\t\t\t\t\t\t...(isLegendEnabled ? [legendComponent] : []),\n\t\t\t\t\t\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 Tooltip(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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BAAwB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YAE9C,IAAM,oBAAoB,GAAG;gBAC5B,EAAE,EAAE,QAAQ;gBACZ,UAAU,EAAE,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACnD,MAAM,EAAE;oBACP,CAAC,EAAE,YAAY,CAAC,SAAS;oBACzB,CAAC,EAAE,YAAY,CAAC,KAAK;iBACrB;aACD,CAAC;YAEF,wBAAwB,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;SACpD;QACD,wBAAwB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAElD,OAAO;YACN,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACtC,IAAI,eAAe,CAClB,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,QAAQ,EACb,wBAAwB,EACxB;gBACC,SAAS,EAAE,eAAe,CAAC,MAAM;aACjC,CACD;SACD,CAAC;IACH,CAAC;IACF,YAAC;AAAD,CAAC,AAnND,IAmNC","sourcesContent":["// Internal Imports\nimport {\n\tChartConfig,\n\tBaseChartOptions,\n\tLayoutGrowth,\n\tLayoutDirection,\n\tLegendOrientations,\n\tEvents as ChartEvents,\n} from './interfaces';\n\n// Misc\nimport { ChartModel } from './model';\nimport {\n\tComponent,\n\tTitle,\n\tLegend,\n\tLayoutComponent,\n\tTooltip,\n\tSpacer,\n} from './components';\nimport { Tools } from './tools';\n\n// Services\nimport { DOMUtils, Events, GradientUtils, Transitions } from './services/index';\n\nexport class Chart {\n\tcomponents: Component[];\n\tservices: any = {\n\t\tdomUtils: DOMUtils,\n\t\tevents: Events,\n\t\tgradientUtils: GradientUtils,\n\t\ttransitions: Transitions,\n\t};\n\tmodel: ChartModel = new ChartModel(this.services);\n\n\tconstructor(holder: Element, chartConfigs: ChartConfig<BaseChartOptions>) {}\n\n\t// Contains the code that uses properties that are overridable by the super-class\n\tinit(holder: Element, chartConfigs: ChartConfig<BaseChartOptions>) {\n\t\t// Store the holder in the model\n\t\tthis.model.set({ holder }, { skipUpdate: true });\n\n\t\t// Initialize all services\n\t\tObject.keys(this.services).forEach((serviceName) => {\n\t\t\tconst serviceObj = this.services[serviceName];\n\t\t\tthis.services[serviceName] = new serviceObj(\n\t\t\t\tthis.model,\n\t\t\t\tthis.services\n\t\t\t);\n\t\t});\n\n\t\t// Call update() when model has been updated\n\t\tthis.services.events.addEventListener(ChartEvents.Model.UPDATE, (e) => {\n\t\t\tconst animate = !!Tools.getProperty(e, 'detail', 'animate');\n\t\t\tthis.update(animate);\n\t\t});\n\n\t\t// Set model data & options\n\t\tthis.model.setData(chartConfigs.data);\n\n\t\t// Set chart resize event listener\n\t\tthis.services.events.addEventListener(ChartEvents.Chart.RESIZE, () => {\n\t\t\tthis.update(false);\n\t\t});\n\n\t\tthis.components = this.getComponents();\n\n\t\tthis.update();\n\t}\n\n\tgetComponents(): any[] {\n\t\tconsole.error('getComponents() method is not implemented');\n\n\t\treturn null;\n\t}\n\n\tupdate(animate = true) {\n\t\tif (!this.components) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Update all services\n\t\tObject.keys(this.services).forEach((serviceName) => {\n\t\t\tconst serviceObj = this.services[serviceName];\n\t\t\tserviceObj.update();\n\t\t});\n\n\t\t// Render all components\n\t\tthis.components.forEach((component) => component.render(animate));\n\n\t\t// Asynchronously dispatch a \"render-finished\" event\n\t\t// This is needed because of d3-transitions\n\t\t// Since at the start of the transition\n\t\t// Elements do not hold their final size or position\n\t\tconst pendingTransitions = this.services.transitions.getPendingTransitions();\n\t\tconst promises = Object.keys(pendingTransitions).map((transitionID) => {\n\t\t\tconst transition = pendingTransitions[transitionID];\n\t\t\treturn transition.end().catch((e) => e); // Skip rejects since we don't care about those;\n\t\t});\n\n\t\tPromise.all(promises).then(() =>\n\t\t\tthis.services.events.dispatchEvent(\n\t\t\t\tChartEvents.Chart.RENDER_FINISHED\n\t\t\t)\n\t\t);\n\t}\n\n\tdestroy() {\n\t\t// Call the destroy() method on all components\n\t\tthis.components.forEach((component) => component.destroy());\n\n\t\t// Remove the chart holder\n\t\tthis.services.domUtils.getHolder().remove();\n\n\t\tthis.model.set({ destroyed: true }, { skipUpdate: true });\n\t}\n\n\tprotected getChartComponents(graphFrameComponents: any[]) {\n\t\tconst titleComponent = {\n\t\t\tid: 'title',\n\t\t\tcomponents: [new Title(this.model, this.services)],\n\t\t\tgrowth: {\n\t\t\t\tx: LayoutGrowth.PREFERRED,\n\t\t\t\ty: LayoutGrowth.FIXED,\n\t\t\t},\n\t\t};\n\n\t\tconst legendComponent = {\n\t\t\tid: 'legend',\n\t\t\tcomponents: [new Legend(this.model, this.services)],\n\t\t\tgrowth: {\n\t\t\t\tx: LayoutGrowth.PREFERRED,\n\t\t\t\ty: LayoutGrowth.FIXED,\n\t\t\t},\n\t\t};\n\n\t\tconst graphFrameComponent = {\n\t\t\tid: 'graph-frame',\n\t\t\tcomponents: graphFrameComponents,\n\t\t\tgrowth: {\n\t\t\t\tx: LayoutGrowth.STRETCH,\n\t\t\t\ty: LayoutGrowth.FIXED,\n\t\t\t},\n\t\t};\n\n\t\tconst isLegendEnabled =\n\t\t\tthis.model.getOptions().legend.enabled !== false;\n\t\t// TODORF - REUSE BETWEEN AXISCHART & CHART\n\t\t// Decide the position of the legend in reference to the chart\n\t\tlet fullFrameComponentDirection = LayoutDirection.COLUMN;\n\t\tif (isLegendEnabled) {\n\t\t\tconst legendPosition = Tools.getProperty(\n\t\t\t\tthis.model.getOptions(),\n\t\t\t\t'legend',\n\t\t\t\t'position'\n\t\t\t);\n\t\t\tif (legendPosition === 'left') {\n\t\t\t\tfullFrameComponentDirection = LayoutDirection.ROW;\n\n\t\t\t\tif (!this.model.getOptions().legend.orientation) {\n\t\t\t\t\tthis.model.getOptions().legend.orientation =\n\t\t\t\t\t\tLegendOrientations.VERTICAL;\n\t\t\t\t}\n\t\t\t} else if (legendPosition === 'right') {\n\t\t\t\tfullFrameComponentDirection = LayoutDirection.ROW_REVERSE;\n\n\t\t\t\tif (!this.model.getOptions().legend.orientation) {\n\t\t\t\t\tthis.model.getOptions().legend.orientation =\n\t\t\t\t\t\tLegendOrientations.VERTICAL;\n\t\t\t\t}\n\t\t\t} else if (legendPosition === 'bottom') {\n\t\t\t\tfullFrameComponentDirection = LayoutDirection.COLUMN_REVERSE;\n\t\t\t}\n\t\t}\n\n\t\tconst legendSpacerComponent = {\n\t\t\tid: 'spacer',\n\t\t\tcomponents: [new Spacer(this.model, this.services)],\n\t\t\tgrowth: {\n\t\t\t\tx: LayoutGrowth.PREFERRED,\n\t\t\t\ty: LayoutGrowth.FIXED,\n\t\t\t},\n\t\t};\n\n\t\tconst fullFrameComponent = {\n\t\t\tid: 'full-frame',\n\t\t\tcomponents: [\n\t\t\t\tnew LayoutComponent(\n\t\t\t\t\tthis.model,\n\t\t\t\t\tthis.services,\n\t\t\t\t\t[\n\t\t\t\t\t\t...(isLegendEnabled ? [legendComponent] : []),\n\t\t\t\t\t\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 Tooltip(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/charts/area-stacked.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AxisChart } from
|
|
2
|
-
import { ChartConfig, AreaChartOptions } from
|
|
1
|
+
import { AxisChart } from '../axis-chart';
|
|
2
|
+
import { ChartConfig, AreaChartOptions } from '../interfaces/index';
|
|
3
3
|
export declare class StackedAreaChart extends AxisChart {
|
|
4
4
|
constructor(holder: Element, chartConfigs: ChartConfig<AreaChartOptions>);
|
|
5
5
|
getComponents(): any[];
|
package/charts/area-stacked.js
CHANGED
|
@@ -12,12 +12,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
12
12
|
};
|
|
13
13
|
})();
|
|
14
14
|
// Internal Imports
|
|
15
|
-
import { AxisChart } from
|
|
16
|
-
import * as Configuration from
|
|
17
|
-
import { Skeletons } from
|
|
18
|
-
import { Tools } from
|
|
15
|
+
import { AxisChart } from '../axis-chart';
|
|
16
|
+
import * as Configuration from '../configuration';
|
|
17
|
+
import { Skeletons } from '../interfaces/index';
|
|
18
|
+
import { Tools } from '../tools';
|
|
19
19
|
// Components
|
|
20
|
-
import { Grid, StackedArea, StackedRuler, TwoDimensionalAxes, Line, StackedScatter, Skeleton } from
|
|
20
|
+
import { Grid, StackedArea, StackedRuler, TwoDimensionalAxes, Line, StackedScatter, Skeleton, } from '../components/index';
|
|
21
21
|
var StackedAreaChart = /** @class */ (function (_super) {
|
|
22
22
|
__extends(StackedAreaChart, _super);
|
|
23
23
|
function StackedAreaChart(holder, chartConfigs) {
|
|
@@ -40,11 +40,11 @@ var StackedAreaChart = /** @class */ (function (_super) {
|
|
|
40
40
|
new StackedScatter(this.model, this.services, {
|
|
41
41
|
fadeInOnChartHolderMouseover: true,
|
|
42
42
|
handleThresholds: true,
|
|
43
|
-
stacked: true
|
|
43
|
+
stacked: true,
|
|
44
44
|
}),
|
|
45
45
|
new Skeleton(this.model, this.services, {
|
|
46
|
-
skeleton: Skeletons.GRID
|
|
47
|
-
})
|
|
46
|
+
skeleton: Skeletons.GRID,
|
|
47
|
+
}),
|
|
48
48
|
];
|
|
49
49
|
var components = this.getAxisChartComponents(graphFrameComponents);
|
|
50
50
|
return components;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"area-stacked.js","sourceRoot":"","sources":["area-stacked.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAiC,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,aAAa;AACb,OAAO,EACN,IAAI,EACJ,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,IAAI,EACJ,cAAc,EACd,QAAQ,
|
|
1
|
+
{"version":3,"file":"area-stacked.js","sourceRoot":"","sources":["area-stacked.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAiC,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,aAAa;AACb,OAAO,EACN,IAAI,EACJ,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,IAAI,EACJ,cAAc,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ACpB,CAAC;QACF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,uBAAC;AAAD,CAAC,AAxCD,CAAsC,SAAS,GAwC9C","sourcesContent":["// Internal Imports\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, AreaChartOptions, Skeletons } from '../interfaces/index';\nimport { Tools } from '../tools';\n\n// Components\nimport {\n\tGrid,\n\tStackedArea,\n\tStackedRuler,\n\tTwoDimensionalAxes,\n\tLine,\n\tStackedScatter,\n\tSkeleton,\n} from '../components/index';\n\nexport class StackedAreaChart extends AxisChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<AreaChartOptions>) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(\n\t\t\tTools.mergeDefaultChartOptions(\n\t\t\t\tConfiguration.options.stackedAreaChart,\n\t\t\t\tchartConfigs.options\n\t\t\t)\n\t\t);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetComponents() {\n\t\t// Specify what to render inside the graph-frame\n\t\tconst graphFrameComponents: any[] = [\n\t\t\tnew TwoDimensionalAxes(this.model, this.services),\n\t\t\tnew Grid(this.model, this.services),\n\t\t\tnew StackedRuler(this.model, this.services),\n\t\t\tnew StackedArea(this.model, this.services),\n\t\t\tnew Line(this.model, this.services, { stacked: true }),\n\t\t\tnew StackedScatter(this.model, this.services, {\n\t\t\t\tfadeInOnChartHolderMouseover: true,\n\t\t\t\thandleThresholds: true,\n\t\t\t\tstacked: true,\n\t\t\t}),\n\t\t\tnew Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.GRID,\n\t\t\t}),\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(\n\t\t\tgraphFrameComponents\n\t\t);\n\t\treturn components;\n\t}\n}\n"]}
|
package/charts/area.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AxisChart } from
|
|
2
|
-
import { ChartConfig, AreaChartOptions } from
|
|
1
|
+
import { AxisChart } from '../axis-chart';
|
|
2
|
+
import { ChartConfig, AreaChartOptions } from '../interfaces/index';
|
|
3
3
|
export declare class AreaChart extends AxisChart {
|
|
4
4
|
constructor(holder: Element, chartConfigs: ChartConfig<AreaChartOptions>);
|
|
5
5
|
getComponents(): any[];
|
package/charts/area.js
CHANGED
|
@@ -12,12 +12,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
12
12
|
};
|
|
13
13
|
})();
|
|
14
14
|
// Internal Imports
|
|
15
|
-
import { AxisChart } from
|
|
16
|
-
import * as Configuration from
|
|
17
|
-
import { Skeletons } from
|
|
18
|
-
import { Tools } from
|
|
15
|
+
import { AxisChart } from '../axis-chart';
|
|
16
|
+
import * as Configuration from '../configuration';
|
|
17
|
+
import { Skeletons } from '../interfaces/index';
|
|
18
|
+
import { Tools } from '../tools';
|
|
19
19
|
// Components
|
|
20
|
-
import { Grid, Area, Line, Ruler, Scatter, TwoDimensionalAxes, Skeleton } from
|
|
20
|
+
import { Grid, Area, Line, Ruler, Scatter, TwoDimensionalAxes, Skeleton, } from '../components/index';
|
|
21
21
|
var AreaChart = /** @class */ (function (_super) {
|
|
22
22
|
__extends(AreaChart, _super);
|
|
23
23
|
function AreaChart(holder, chartConfigs) {
|
|
@@ -39,11 +39,11 @@ var AreaChart = /** @class */ (function (_super) {
|
|
|
39
39
|
new Area(this.model, this.services),
|
|
40
40
|
new Scatter(this.model, this.services, {
|
|
41
41
|
fadeInOnChartHolderMouseover: true,
|
|
42
|
-
handleThresholds: true
|
|
42
|
+
handleThresholds: true,
|
|
43
43
|
}),
|
|
44
44
|
new Skeleton(this.model, this.services, {
|
|
45
|
-
skeleton: Skeletons.GRID
|
|
46
|
-
})
|
|
45
|
+
skeleton: Skeletons.GRID,
|
|
46
|
+
}),
|
|
47
47
|
];
|
|
48
48
|
var components = this.getAxisChartComponents(graphFrameComponents);
|
|
49
49
|
return components;
|
package/charts/area.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"area.js","sourceRoot":"","sources":["area.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAiC,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,aAAa;AACb,OAAO,EACN,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,OAAO,EACP,kBAAkB,EAKlB,QAAQ,
|
|
1
|
+
{"version":3,"file":"area.js","sourceRoot":"","sources":["area.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAiC,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,aAAa;AACb,OAAO,EACN,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,OAAO,EACP,kBAAkB,EAKlB,QAAQ,GACR,MAAM,qBAAqB,CAAC;AAE7B;IAA+B,6BAAS;IACvC,mBAAY,MAAe,EAAE,YAA2C;QAAxE,YACC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAa3B;QAXA,2CAA2C;QAC3C,iCAAiC;QACjC,KAAI,CAAC,KAAK,CAAC,UAAU,CACpB,KAAK,CAAC,wBAAwB,CAC7B,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC,EAC5C,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QAEF,6CAA6C;QAC7C,KAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;;IACjC,CAAC;IAED,iCAAa,GAAb;QACC,gDAAgD;QAChD,IAAM,oBAAoB,GAAU;YACnC,IAAI,kBAAkB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACjD,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACnC,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACpC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACnC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACnC,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;gBACtC,4BAA4B,EAAE,IAAI;gBAClC,gBAAgB,EAAE,IAAI;aACtB,CAAC;YACF,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;gBACvC,QAAQ,EAAE,SAAS,CAAC,IAAI;aACxB,CAAC;SACF,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CACpD,oBAAoB,CACpB,CAAC;QACF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,gBAAC;AAAD,CAAC,AAvCD,CAA+B,SAAS,GAuCvC","sourcesContent":["// Internal Imports\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, AreaChartOptions, Skeletons } from '../interfaces/index';\nimport { Tools } from '../tools';\n\n// Components\nimport {\n\tGrid,\n\tArea,\n\tLine,\n\tRuler,\n\tScatter,\n\tTwoDimensionalAxes,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nexport class AreaChart extends AxisChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<AreaChartOptions>) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(\n\t\t\tTools.mergeDefaultChartOptions(\n\t\t\t\tTools.clone(Configuration.options.areaChart),\n\t\t\t\tchartConfigs.options\n\t\t\t)\n\t\t);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetComponents() {\n\t\t// Specify what to render inside the graph-frame\n\t\tconst graphFrameComponents: any[] = [\n\t\t\tnew TwoDimensionalAxes(this.model, this.services),\n\t\t\tnew Grid(this.model, this.services),\n\t\t\tnew Ruler(this.model, this.services),\n\t\t\tnew Line(this.model, this.services),\n\t\t\tnew Area(this.model, this.services),\n\t\t\tnew Scatter(this.model, this.services, {\n\t\t\t\tfadeInOnChartHolderMouseover: true,\n\t\t\t\thandleThresholds: true,\n\t\t\t}),\n\t\t\tnew Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.GRID,\n\t\t\t}),\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(\n\t\t\tgraphFrameComponents\n\t\t);\n\t\treturn components;\n\t}\n}\n"]}
|
package/charts/bar-grouped.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AxisChart } from
|
|
2
|
-
import { BarChartOptions, ChartConfig } from
|
|
1
|
+
import { AxisChart } from '../axis-chart';
|
|
2
|
+
import { BarChartOptions, ChartConfig } from '../interfaces/index';
|
|
3
3
|
export declare class GroupedBarChart extends AxisChart {
|
|
4
4
|
constructor(holder: Element, chartConfigs: ChartConfig<BarChartOptions>);
|
|
5
5
|
getComponents(): any[];
|
package/charts/bar-grouped.js
CHANGED
|
@@ -12,12 +12,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
12
12
|
};
|
|
13
13
|
})();
|
|
14
14
|
// Internal Imports
|
|
15
|
-
import { AxisChart } from
|
|
16
|
-
import * as Configuration from
|
|
17
|
-
import { Tools } from
|
|
18
|
-
import { Skeletons } from
|
|
15
|
+
import { AxisChart } from '../axis-chart';
|
|
16
|
+
import * as Configuration from '../configuration';
|
|
17
|
+
import { Tools } from '../tools';
|
|
18
|
+
import { Skeletons } from '../interfaces/enums';
|
|
19
19
|
// Components
|
|
20
|
-
import { Grid, GroupedBar, TwoDimensionalAxes, ZeroLine, Skeleton } from
|
|
20
|
+
import { Grid, GroupedBar, TwoDimensionalAxes, ZeroLine, Skeleton, } from '../components/index';
|
|
21
21
|
var GroupedBarChart = /** @class */ (function (_super) {
|
|
22
22
|
__extends(GroupedBarChart, _super);
|
|
23
23
|
function GroupedBarChart(holder, chartConfigs) {
|
|
@@ -37,8 +37,8 @@ var GroupedBarChart = /** @class */ (function (_super) {
|
|
|
37
37
|
new GroupedBar(this.model, this.services),
|
|
38
38
|
new ZeroLine(this.model, this.services),
|
|
39
39
|
new Skeleton(this.model, this.services, {
|
|
40
|
-
skeleton: Skeletons.VERT_OR_HORIZ
|
|
41
|
-
})
|
|
40
|
+
skeleton: Skeletons.VERT_OR_HORIZ,
|
|
41
|
+
}),
|
|
42
42
|
];
|
|
43
43
|
var components = this.getAxisChartComponents(graphFrameComponents);
|
|
44
44
|
return components;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bar-grouped.js","sourceRoot":"","sources":["bar-grouped.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,aAAa;AACb,OAAO,EACN,IAAI,EACJ,UAAU,EACV,kBAAkB,EAClB,QAAQ,EAKR,QAAQ,
|
|
1
|
+
{"version":3,"file":"bar-grouped.js","sourceRoot":"","sources":["bar-grouped.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IAAI,CAAC,sBAAsB,CACpD,oBAAoB,CACpB,CAAC;QACF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,sBAAC;AAAD,CAAC,AAlCD,CAAqC,SAAS,GAkC7C","sourcesContent":["// Internal Imports\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport { BarChartOptions, ChartConfig } from '../interfaces/index';\nimport { Tools } from '../tools';\nimport { Skeletons } from '../interfaces/enums';\n\n// Components\nimport {\n\tGrid,\n\tGroupedBar,\n\tTwoDimensionalAxes,\n\tZeroLine,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nexport class GroupedBarChart extends AxisChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<BarChartOptions>) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(\n\t\t\tTools.mergeDefaultChartOptions(\n\t\t\t\tConfiguration.options.groupedBarChart,\n\t\t\t\tchartConfigs.options\n\t\t\t)\n\t\t);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetComponents() {\n\t\t// Specify what to render inside the graph-frame\n\t\tconst graphFrameComponents: any[] = [\n\t\t\tnew TwoDimensionalAxes(this.model, this.services),\n\t\t\tnew Grid(this.model, this.services),\n\t\t\tnew GroupedBar(this.model, this.services),\n\t\t\tnew ZeroLine(this.model, this.services),\n\t\t\tnew Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.VERT_OR_HORIZ,\n\t\t\t}),\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(\n\t\t\tgraphFrameComponents\n\t\t);\n\t\treturn components;\n\t}\n}\n"]}
|
package/charts/bar-simple.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AxisChart } from
|
|
2
|
-
import { BarChartOptions, ChartConfig } from
|
|
1
|
+
import { AxisChart } from '../axis-chart';
|
|
2
|
+
import { BarChartOptions, ChartConfig } from '../interfaces/index';
|
|
3
3
|
export declare class SimpleBarChart extends AxisChart {
|
|
4
4
|
constructor(holder: Element, chartConfigs: ChartConfig<BarChartOptions>);
|
|
5
5
|
getComponents(): any[];
|
package/charts/bar-simple.js
CHANGED
|
@@ -12,12 +12,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
12
12
|
};
|
|
13
13
|
})();
|
|
14
14
|
// Internal Imports
|
|
15
|
-
import { AxisChart } from
|
|
16
|
-
import * as Configuration from
|
|
17
|
-
import { Tools } from
|
|
18
|
-
import { Skeletons } from
|
|
15
|
+
import { AxisChart } from '../axis-chart';
|
|
16
|
+
import * as Configuration from '../configuration';
|
|
17
|
+
import { Tools } from '../tools';
|
|
18
|
+
import { Skeletons } from '../interfaces/enums';
|
|
19
19
|
// Components
|
|
20
|
-
import { Grid, SimpleBar, TwoDimensionalAxes, ZeroLine, Skeleton } from
|
|
20
|
+
import { Grid, SimpleBar, TwoDimensionalAxes, ZeroLine, Skeleton, } from '../components/index';
|
|
21
21
|
var SimpleBarChart = /** @class */ (function (_super) {
|
|
22
22
|
__extends(SimpleBarChart, _super);
|
|
23
23
|
function SimpleBarChart(holder, chartConfigs) {
|
|
@@ -37,8 +37,8 @@ var SimpleBarChart = /** @class */ (function (_super) {
|
|
|
37
37
|
new SimpleBar(this.model, this.services),
|
|
38
38
|
new ZeroLine(this.model, this.services),
|
|
39
39
|
new Skeleton(this.model, this.services, {
|
|
40
|
-
skeleton: Skeletons.VERT_OR_HORIZ
|
|
41
|
-
})
|
|
40
|
+
skeleton: Skeletons.VERT_OR_HORIZ,
|
|
41
|
+
}),
|
|
42
42
|
];
|
|
43
43
|
var components = this.getAxisChartComponents(graphFrameComponents);
|
|
44
44
|
return components;
|
package/charts/bar-simple.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bar-simple.js","sourceRoot":"","s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QAAQ,CAAC;YACjD,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACnC,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACxC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACvC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;gBACvC,QAAQ,EAAE,SAAS,CAAC,aAAa;aACjC,CAAC;SACF,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CACpD,oBAAoB,CACpB,CAAC;QACF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,qBAAC;AAAD,CAAC,AAlCD,CAAoC,SAAS,GAkC5C","sourcesContent":["// Internal Imports\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport { BarChartOptions, ChartConfig } from '../interfaces/index';\nimport { Tools } from '../tools';\nimport { Skeletons } from '../interfaces/enums';\n\n// Components\nimport {\n\tGrid,\n\tSimpleBar,\n\tTwoDimensionalAxes,\n\tZeroLine,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nexport class SimpleBarChart extends AxisChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<BarChartOptions>) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(\n\t\t\tTools.mergeDefaultChartOptions(\n\t\t\t\tConfiguration.options.simpleBarChart,\n\t\t\t\tchartConfigs.options\n\t\t\t)\n\t\t);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetComponents() {\n\t\t// Specify what to render inside the graph-frame\n\t\tconst graphFrameComponents: any[] = [\n\t\t\tnew TwoDimensionalAxes(this.model, this.services),\n\t\t\tnew Grid(this.model, this.services),\n\t\t\tnew SimpleBar(this.model, this.services),\n\t\t\tnew ZeroLine(this.model, this.services),\n\t\t\tnew Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.VERT_OR_HORIZ,\n\t\t\t}),\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(\n\t\t\tgraphFrameComponents\n\t\t);\n\t\treturn components;\n\t}\n}\n"]}
|
package/charts/bar-stacked.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AxisChart } from
|
|
2
|
-
import { ChartConfig, BarChartOptions } from
|
|
1
|
+
import { AxisChart } from '../axis-chart';
|
|
2
|
+
import { ChartConfig, BarChartOptions } from '../interfaces/index';
|
|
3
3
|
export declare class StackedBarChart extends AxisChart {
|
|
4
4
|
constructor(holder: Element, chartConfigs: ChartConfig<BarChartOptions>);
|
|
5
5
|
getComponents(): any[];
|
package/charts/bar-stacked.js
CHANGED
|
@@ -12,12 +12,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
12
12
|
};
|
|
13
13
|
})();
|
|
14
14
|
// Internal Imports
|
|
15
|
-
import { AxisChart } from
|
|
16
|
-
import * as Configuration from
|
|
17
|
-
import { Tools } from
|
|
18
|
-
import { Skeletons } from
|
|
15
|
+
import { AxisChart } from '../axis-chart';
|
|
16
|
+
import * as Configuration from '../configuration';
|
|
17
|
+
import { Tools } from '../tools';
|
|
18
|
+
import { Skeletons } from '../interfaces/enums';
|
|
19
19
|
// Components
|
|
20
|
-
import { Grid, StackedBar, StackedRuler, TwoDimensionalAxes, Skeleton } from
|
|
20
|
+
import { Grid, StackedBar, StackedRuler, TwoDimensionalAxes, Skeleton, } from '../components/index';
|
|
21
21
|
var StackedBarChart = /** @class */ (function (_super) {
|
|
22
22
|
__extends(StackedBarChart, _super);
|
|
23
23
|
function StackedBarChart(holder, chartConfigs) {
|
|
@@ -37,8 +37,8 @@ var StackedBarChart = /** @class */ (function (_super) {
|
|
|
37
37
|
new StackedRuler(this.model, this.services),
|
|
38
38
|
new StackedBar(this.model, this.services),
|
|
39
39
|
new Skeleton(this.model, this.services, {
|
|
40
|
-
skeleton: Skeletons.VERT_OR_HORIZ
|
|
41
|
-
})
|
|
40
|
+
skeleton: Skeletons.VERT_OR_HORIZ,
|
|
41
|
+
}),
|
|
42
42
|
];
|
|
43
43
|
var components = this.getAxisChartComponents(graphFrameComponents);
|
|
44
44
|
return components;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bar-stacked.js","sourceRoot":"","sources":["bar-stacked.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,aAAa;AACb,OAAO,EACN,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,kBAAkB,EAKlB,QAAQ,
|
|
1
|
+
{"version":3,"file":"bar-stacked.js","sourceRoot":"","sources":["bar-stacked.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,aAAa;AACb,OAAO,EACN,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,kBAAkB,EAKlB,QAAQ,GACR,MAAM,qBAAqB,CAAC;AAE7B;IAAqC,mCAAS;IAC7C,yBAAY,MAAe,EAAE,YAA0C;QAAvE,YACC,kBAAM,MAAM,EAAE,YAAY,CAAC,SAa3B;QAXA,2CAA2C;QAC3C,iCAAiC;QACjC,KAAI,CAAC,KAAK,CAAC,UAAU,CACpB,KAAK,CAAC,wBAAwB,CAC7B,aAAa,CAAC,OAAO,CAAC,eAAe,EACrC,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QAEF,6CAA6C;QAC7C,KAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;;IACjC,CAAC;IAED,uCAAa,GAAb;QACC,gDAAgD;QAChD,IAAM,oBAAoB,GAAU;YACnC,IAAI,kBAAkB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACjD,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACnC,IAAI,YAAY,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YAC3C,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;YACzC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;gBACvC,QAAQ,EAAE,SAAS,CAAC,aAAa;aACjC,CAAC;SACF,CAAC;QAEF,IAAM,UAAU,GAAU,IAAI,CAAC,sBAAsB,CACpD,oBAAoB,CACpB,CAAC;QACF,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,sBAAC;AAAD,CAAC,AAlCD,CAAqC,SAAS,GAkC7C","sourcesContent":["// Internal Imports\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, BarChartOptions } from '../interfaces/index';\nimport { Tools } from '../tools';\nimport { Skeletons } from '../interfaces/enums';\n\n// Components\nimport {\n\tGrid,\n\tStackedBar,\n\tStackedRuler,\n\tTwoDimensionalAxes,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nexport class StackedBarChart extends AxisChart {\n\tconstructor(holder: Element, chartConfigs: ChartConfig<BarChartOptions>) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(\n\t\t\tTools.mergeDefaultChartOptions(\n\t\t\t\tConfiguration.options.stackedBarChart,\n\t\t\t\tchartConfigs.options\n\t\t\t)\n\t\t);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetComponents() {\n\t\t// Specify what to render inside the graph-frame\n\t\tconst graphFrameComponents: any[] = [\n\t\t\tnew TwoDimensionalAxes(this.model, this.services),\n\t\t\tnew Grid(this.model, this.services),\n\t\t\tnew StackedRuler(this.model, this.services),\n\t\t\tnew StackedBar(this.model, this.services),\n\t\t\tnew Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.VERT_OR_HORIZ,\n\t\t\t}),\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(\n\t\t\tgraphFrameComponents\n\t\t);\n\t\treturn components;\n\t}\n}\n"]}
|
package/charts/bubble.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AxisChart } from
|
|
2
|
-
import { ChartConfig, BubbleChartOptions } from
|
|
1
|
+
import { AxisChart } from '../axis-chart';
|
|
2
|
+
import { ChartConfig, BubbleChartOptions } from '../interfaces/index';
|
|
3
3
|
export declare class BubbleChart extends AxisChart {
|
|
4
4
|
constructor(holder: Element, chartConfigs: ChartConfig<BubbleChartOptions>);
|
|
5
5
|
getComponents(): any[];
|
package/charts/bubble.js
CHANGED
|
@@ -12,12 +12,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
12
12
|
};
|
|
13
13
|
})();
|
|
14
14
|
// Internal Imports
|
|
15
|
-
import { AxisChart } from
|
|
16
|
-
import * as Configuration from
|
|
17
|
-
import { Tools } from
|
|
18
|
-
import { Skeletons } from
|
|
15
|
+
import { AxisChart } from '../axis-chart';
|
|
16
|
+
import * as Configuration from '../configuration';
|
|
17
|
+
import { Tools } from '../tools';
|
|
18
|
+
import { Skeletons } from '../interfaces/enums';
|
|
19
19
|
// Components
|
|
20
|
-
import { Grid, Ruler, Bubble, TwoDimensionalAxes, Skeleton } from
|
|
20
|
+
import { Grid, Ruler, Bubble, TwoDimensionalAxes, Skeleton, } from '../components/index';
|
|
21
21
|
var BubbleChart = /** @class */ (function (_super) {
|
|
22
22
|
__extends(BubbleChart, _super);
|
|
23
23
|
function BubbleChart(holder, chartConfigs) {
|
|
@@ -37,8 +37,8 @@ var BubbleChart = /** @class */ (function (_super) {
|
|
|
37
37
|
new Ruler(this.model, this.services),
|
|
38
38
|
new Bubble(this.model, this.services),
|
|
39
39
|
new Skeleton(this.model, this.services, {
|
|
40
|
-
skeleton: Skeletons.GRID
|
|
41
|
-
})
|
|
40
|
+
skeleton: Skeletons.GRID,
|
|
41
|
+
}),
|
|
42
42
|
];
|
|
43
43
|
var components = this.getAxisChartComponents(graphFrameComponents);
|
|
44
44
|
return components;
|
package/charts/bubble.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bubble.js","sourceRoot":"","sources":["bubble.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,aAAa;AACb,OAAO,EACN,IAAI,EACJ,KAAK,EACL,MAAM,EACN,kBAAkB,EAKlB,QAAQ,
|
|
1
|
+
{"version":3,"file":"bubble.js","sourceRoot":"","sources":["bubble.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,aAAa,MAAM,kBAAkB,CA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["// Internal Imports\nimport { AxisChart } from '../axis-chart';\nimport * as Configuration from '../configuration';\nimport { ChartConfig, BubbleChartOptions } from '../interfaces/index';\nimport { Tools } from '../tools';\nimport { Skeletons } from '../interfaces/enums';\n\n// Components\nimport {\n\tGrid,\n\tRuler,\n\tBubble,\n\tTwoDimensionalAxes,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tTooltip,\n\tLegend,\n\tLayoutComponent,\n\tSkeleton,\n} from '../components/index';\n\nexport class BubbleChart extends AxisChart {\n\tconstructor(\n\t\tholder: Element,\n\t\tchartConfigs: ChartConfig<BubbleChartOptions>\n\t) {\n\t\tsuper(holder, chartConfigs);\n\n\t\t// Merge the default options for this chart\n\t\t// With the user provided options\n\t\tthis.model.setOptions(\n\t\t\tTools.mergeDefaultChartOptions(\n\t\t\t\tConfiguration.options.bubbleChart,\n\t\t\t\tchartConfigs.options\n\t\t\t)\n\t\t);\n\n\t\t// Initialize data, services, components etc.\n\t\tthis.init(holder, chartConfigs);\n\t}\n\n\tgetComponents() {\n\t\t// Specify what to render inside the graph-frame\n\t\tconst graphFrameComponents: any[] = [\n\t\t\tnew TwoDimensionalAxes(this.model, this.services),\n\t\t\tnew Grid(this.model, this.services),\n\t\t\tnew Ruler(this.model, this.services),\n\t\t\tnew Bubble(this.model, this.services),\n\t\t\tnew Skeleton(this.model, this.services, {\n\t\t\t\tskeleton: Skeletons.GRID,\n\t\t\t}),\n\t\t];\n\n\t\tconst components: any[] = this.getAxisChartComponents(\n\t\t\tgraphFrameComponents\n\t\t);\n\t\treturn components;\n\t}\n}\n"]}
|
package/charts/combo.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AxisChart } from
|
|
2
|
-
import { ChartConfig, ComboChartOptions } from
|
|
1
|
+
import { AxisChart } from '../axis-chart';
|
|
2
|
+
import { ChartConfig, ComboChartOptions } from '../interfaces/index';
|
|
3
3
|
export declare class ComboChart extends AxisChart {
|
|
4
4
|
constructor(holder: Element, chartConfigs: ChartConfig<ComboChartOptions>);
|
|
5
5
|
getGraphComponents(): any;
|