@carbon/charts 0.49.4 → 0.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/build/src/components/essentials/threshold.d.ts +1 -0
- package/build/src/services/essentials/transitions.d.ts +0 -3
- package/build/stories/tutorials/feature-flags.d.ts +4 -0
- package/build/stories/tutorials/index.d.ts +1 -0
- package/bundle.js +1 -1
- package/components/essentials/threshold.d.ts +1 -0
- package/components/essentials/threshold.js +42 -16
- package/components/essentials/threshold.js.map +1 -1
- package/components/graphs/alluvial.js +14 -2
- package/components/graphs/alluvial.js.map +1 -1
- package/components/graphs/area-stacked.js +14 -2
- package/components/graphs/area-stacked.js.map +1 -1
- package/components/graphs/area.js +14 -2
- package/components/graphs/area.js.map +1 -1
- package/components/graphs/bar-grouped.js +14 -4
- package/components/graphs/bar-grouped.js.map +1 -1
- package/components/graphs/bar-simple.js +14 -4
- package/components/graphs/bar-simple.js.map +1 -1
- package/components/graphs/bar-stacked.js +14 -3
- package/components/graphs/bar-stacked.js.map +1 -1
- package/components/graphs/bullet.js +14 -4
- package/components/graphs/bullet.js.map +1 -1
- package/components/graphs/circle-pack.js +21 -3
- package/components/graphs/circle-pack.js.map +1 -1
- package/components/graphs/histogram.js +14 -3
- package/components/graphs/histogram.js.map +1 -1
- package/components/graphs/line.js +14 -2
- package/components/graphs/line.js.map +1 -1
- package/components/graphs/lollipop.js +14 -2
- package/components/graphs/lollipop.js.map +1 -1
- package/components/graphs/meter.js +0 -1
- package/components/graphs/meter.js.map +1 -1
- package/components/graphs/pie.js +28 -4
- package/components/graphs/pie.js.map +1 -1
- package/components/graphs/radar.js +134 -17
- package/components/graphs/radar.js.map +1 -1
- package/components/graphs/scatter.js +28 -4
- package/components/graphs/scatter.js.map +1 -1
- package/components/graphs/treemap.js +28 -4
- package/components/graphs/treemap.js.map +1 -1
- package/components/graphs/wordcloud.js +30 -5
- package/components/graphs/wordcloud.js.map +1 -1
- package/demo/styles.css +9236 -10907
- package/demo/styles.css.map +1 -1
- package/demo/styles.min.css +1 -1
- package/demo/styles.min.css.map +1 -1
- package/package.json +1 -1
- package/services/essentials/transitions.d.ts +0 -3
- package/services/essentials/transitions.js +1 -25
- package/services/essentials/transitions.js.map +1 -1
- package/styles/_chart-feature-flags.scss +4 -0
- package/styles/_type.scss +7 -2
- package/styles/components/_modal.scss +0 -4
- package/styles/components/_toolbar.scss +0 -4
- package/styles/styles.scss +1 -0
- package/styles-g10.css +45 -3525
- 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 +46 -3526
- 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 +46 -3526
- 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 +45 -3525
- package/styles.css.map +1 -1
- package/styles.min.css +1 -1
- package/styles.min.css.map +1 -1
- package/tsconfig.tsbuildinfo +21 -22
package/package.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Service } from '../service';
|
|
2
|
-
import { Transition } from 'd3-transition';
|
|
3
2
|
interface setupTransitionConfigs {
|
|
4
3
|
transition?: any;
|
|
5
4
|
name?: string;
|
|
@@ -8,8 +7,6 @@ interface setupTransitionConfigs {
|
|
|
8
7
|
export declare class Transitions extends Service {
|
|
9
8
|
pendingTransitions: {};
|
|
10
9
|
init(): void;
|
|
11
|
-
getTransition(name: string, animate?: boolean): Transition<any, any, any, any>;
|
|
12
|
-
getInstantTransition(name?: string): Transition<any, any, any, any>;
|
|
13
10
|
setupTransition({ transition: t, name, animate }: setupTransitionConfigs): any;
|
|
14
11
|
getPendingTransitions(): {};
|
|
15
12
|
}
|
|
@@ -16,8 +16,6 @@ import { Service } from '../service';
|
|
|
16
16
|
import * as Configuration from '../../configuration';
|
|
17
17
|
import { Events } from './../../interfaces';
|
|
18
18
|
import { Tools } from '../../tools';
|
|
19
|
-
// D3 Imports
|
|
20
|
-
import { transition } from 'd3-transition';
|
|
21
19
|
var Transitions = /** @class */ (function (_super) {
|
|
22
20
|
__extends(Transitions, _super);
|
|
23
21
|
function Transitions() {
|
|
@@ -31,28 +29,6 @@ var Transitions = /** @class */ (function (_super) {
|
|
|
31
29
|
_this.pendingTransitions = {};
|
|
32
30
|
});
|
|
33
31
|
};
|
|
34
|
-
Transitions.prototype.getTransition = function (name, animate) {
|
|
35
|
-
var _this = this;
|
|
36
|
-
if (this.model.getOptions().animations === false || animate === false) {
|
|
37
|
-
return this.getInstantTransition(name);
|
|
38
|
-
}
|
|
39
|
-
var t = transition(name).duration(Tools.getProperty(Configuration.transitions, name, 'duration') ||
|
|
40
|
-
Configuration.transitions.default.duration);
|
|
41
|
-
this.pendingTransitions[t._id] = t;
|
|
42
|
-
t.on('end interrupt cancel', function () {
|
|
43
|
-
delete _this.pendingTransitions[t._id];
|
|
44
|
-
});
|
|
45
|
-
return t;
|
|
46
|
-
};
|
|
47
|
-
Transitions.prototype.getInstantTransition = function (name) {
|
|
48
|
-
var _this = this;
|
|
49
|
-
var t = transition(name).duration(0);
|
|
50
|
-
this.pendingTransitions[t._id] = t;
|
|
51
|
-
t.on('end interrupt cancel', function () {
|
|
52
|
-
delete _this.pendingTransitions[t._id];
|
|
53
|
-
});
|
|
54
|
-
return t;
|
|
55
|
-
};
|
|
56
32
|
Transitions.prototype.setupTransition = function (_a) {
|
|
57
33
|
var _this = this;
|
|
58
34
|
var t = _a.transition, name = _a.name, animate = _a.animate;
|
|
@@ -60,7 +36,7 @@ var Transitions = /** @class */ (function (_super) {
|
|
|
60
36
|
t.on('end interrupt cancel', function () {
|
|
61
37
|
delete _this.pendingTransitions[t._id];
|
|
62
38
|
});
|
|
63
|
-
if (animate
|
|
39
|
+
if (this.model.getOptions().animations === false || animate === false) {
|
|
64
40
|
return t.duration(0);
|
|
65
41
|
}
|
|
66
42
|
return t.duration(Tools.getProperty(Configuration.transitions, name, 'duration') ||
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transitions.js","sourceRoot":"","sources":["transitions.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"transitions.js","sourceRoot":"","sources":["transitions.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAWpC;IAAiC,+BAAO;IAAxC;QAAA,qEA4BC;QA3BA,wBAAkB,GAAG,EAAE,CAAC;;IA2BzB,CAAC;IAzBA,0BAAI,GAAJ;QAAA,iBAIC;QAHA,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE;YAC1D,KAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;QAC9B,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,qCAAe,GAAf,UAAgB,EAAwD;QAAxE,iBAcC;YAdiB,iBAAa,EAAE,cAAI,EAAE,oBAAO;QAC7C,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACnC,CAAC,CAAC,EAAE,CAAC,sBAAsB,EAAE;YAC5B,OAAO,KAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;QAEH,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,UAAU,KAAK,KAAK,IAAI,OAAO,KAAK,KAAK,EAAE;YACtE,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;SACrB;QAED,OAAO,CAAC,CAAC,QAAQ,CAChB,KAAK,CAAC,WAAW,CAAC,aAAa,CAAC,WAAW,EAAE,IAAI,EAAE,UAAU,CAAC;YAC7D,aAAa,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,CAC3C,CAAC;IACH,CAAC;IAED,2CAAqB,GAArB;QACC,OAAO,IAAI,CAAC,kBAAkB,CAAC;IAChC,CAAC;IACF,kBAAC;AAAD,CAAC,AA5BD,CAAiC,OAAO,GA4BvC","sourcesContent":["// Internal Imports\nimport { Service } from '../service';\nimport * as Configuration from '../../configuration';\nimport { Events } from './../../interfaces';\nimport { Tools } from '../../tools';\n\n// D3 Imports\nimport { Transition, transition } from 'd3-transition';\n\ninterface setupTransitionConfigs {\n\ttransition?: any; // d3 types are causing issues here, hence why using `any`\n\tname?: string;\n\tanimate?: boolean;\n}\n\nexport class Transitions extends Service {\n\tpendingTransitions = {};\n\n\tinit() {\n\t\tthis.services.events.addEventListener(Events.Model.UPDATE, () => {\n\t\t\tthis.pendingTransitions = {};\n\t\t});\n\t}\n\n\tsetupTransition({ transition: t, name, animate }: setupTransitionConfigs) {\n\t\tthis.pendingTransitions[t._id] = t;\n\t\tt.on('end interrupt cancel', () => {\n\t\t\tdelete this.pendingTransitions[t._id];\n\t\t});\n\n\t\tif (this.model.getOptions().animations === false || animate === false) {\n\t\t\treturn t.duration(0);\n\t\t}\n\n\t\treturn t.duration(\n\t\t\tTools.getProperty(Configuration.transitions, name, 'duration') ||\n\t\t\t\tConfiguration.transitions.default.duration\n\t\t);\n\t}\n\n\tgetPendingTransitions() {\n\t\treturn this.pendingTransitions;\n\t}\n}\n"]}
|
package/styles/_type.scss
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
@import './vendor/@carbon/type/scss/type';
|
|
2
2
|
@import './vendor/@carbon/type/scss/font-face/sans';
|
|
3
3
|
@import './vendor/@carbon/type/scss/font-face/sans-condensed';
|
|
4
|
-
|
|
5
|
-
@
|
|
4
|
+
|
|
5
|
+
@import './chart-feature-flags';
|
|
6
|
+
|
|
7
|
+
@if $chart-feature-flags('enable-font-imports') == true {
|
|
8
|
+
@include carbon--font-face-sans();
|
|
9
|
+
@include carbon--font-face-sans-condensed();
|
|
10
|
+
}
|
|
6
11
|
|
|
7
12
|
.#{$prefix}--#{$charts-prefix}--chart-wrapper {
|
|
8
13
|
font-family: carbon--font-family('sans-condensed');
|