@carbon/charts-vue 0.54.7 → 0.54.11
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 +32 -0
- package/charts-vue.common.js +56 -30
- package/charts-vue.common.js.map +1 -1
- package/charts-vue.umd.js +56 -30
- package/charts-vue.umd.js.map +1 -1
- package/charts-vue.umd.min.js +1 -1
- package/charts-vue.umd.min.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,38 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.54.11](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.10...v0.54.11) (2022-02-02)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.54.10](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.9...v0.54.10) (2022-01-27)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [0.54.9](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.8...v0.54.9) (2022-01-27)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [0.54.8](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.7...v0.54.8) (2022-01-25)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
6
38
|
## [0.54.7](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.6...v0.54.7) (2022-01-13)
|
|
7
39
|
|
|
8
40
|
**Note:** Version bump only for package @carbon/charts-vue
|
package/charts-vue.common.js
CHANGED
|
@@ -8535,6 +8535,7 @@ var axisChart = tools_Tools.merge({}, chart, {
|
|
|
8535
8535
|
var baseBarChart = tools_Tools.merge({}, axisChart, {
|
|
8536
8536
|
bars: {
|
|
8537
8537
|
maxWidth: 16,
|
|
8538
|
+
spacingFactor: 0.25
|
|
8538
8539
|
},
|
|
8539
8540
|
timeScale: tools_Tools.merge(timeScale, {
|
|
8540
8541
|
addSpaceOnEdges: 1,
|
|
@@ -8758,6 +8759,7 @@ var meterChart = tools_Tools.merge({}, chart, {
|
|
|
8758
8759
|
clickable: false,
|
|
8759
8760
|
},
|
|
8760
8761
|
meter: {
|
|
8762
|
+
showLabels: true,
|
|
8761
8763
|
proportional: null,
|
|
8762
8764
|
statusBar: {
|
|
8763
8765
|
percentageIndicator: {
|
|
@@ -16160,10 +16162,11 @@ var scales_cartesian_CartesianScales = /** @class */ (function (_super) {
|
|
|
16160
16162
|
};
|
|
16161
16163
|
CartesianScales.prototype.getBoundedScaledValues = function (datum, index) {
|
|
16162
16164
|
var bounds = this.model.getOptions().bounds;
|
|
16163
|
-
var
|
|
16165
|
+
var axisPosition = this.getRangeAxisPosition({ datum: datum });
|
|
16166
|
+
var scale = this.scales[axisPosition];
|
|
16164
16167
|
var options = this.model.getOptions();
|
|
16165
16168
|
var axesOptions = tools_Tools.getProperty(options, 'axes');
|
|
16166
|
-
var axisOptions = axesOptions[
|
|
16169
|
+
var axisOptions = axesOptions[axisPosition];
|
|
16167
16170
|
var mapsTo = axisOptions.mapsTo;
|
|
16168
16171
|
var value = datum[mapsTo] !== undefined ? datum[mapsTo] : datum;
|
|
16169
16172
|
var boundedValues = [
|
|
@@ -25436,6 +25439,7 @@ var bar_extends = (undefined && undefined.__extends) || (function () {
|
|
|
25436
25439
|
// Internal Imports
|
|
25437
25440
|
|
|
25438
25441
|
|
|
25442
|
+
|
|
25439
25443
|
var bar_Bar = /** @class */ (function (_super) {
|
|
25440
25444
|
bar_extends(Bar, _super);
|
|
25441
25445
|
function Bar() {
|
|
@@ -25453,7 +25457,8 @@ var bar_Bar = /** @class */ (function (_super) {
|
|
|
25453
25457
|
useAttrs: true,
|
|
25454
25458
|
}).width;
|
|
25455
25459
|
if (!mainXScale.step) {
|
|
25456
|
-
|
|
25460
|
+
var spacingFactor = tools_Tools.getProperty(options, 'bars', 'spacingFactor');
|
|
25461
|
+
return Math.min(options.bars.maxWidth, (chartWidth * spacingFactor) / numberOfDatapoints);
|
|
25457
25462
|
}
|
|
25458
25463
|
return Math.min(options.bars.maxWidth, mainXScale.step() / 2);
|
|
25459
25464
|
};
|
|
@@ -26248,8 +26253,9 @@ var bar_stacked_StackedBar = /** @class */ (function (_super) {
|
|
|
26248
26253
|
useAttrs: true,
|
|
26249
26254
|
}).width;
|
|
26250
26255
|
var numberOfDomainValues = this.model.getStackKeys().length;
|
|
26256
|
+
var spacingFactor = tools_Tools.getProperty(options, 'bars', 'spacingFactor');
|
|
26251
26257
|
if (!mainXScale.step) {
|
|
26252
|
-
return Math.min(options.bars.maxWidth, (chartWidth *
|
|
26258
|
+
return Math.min(options.bars.maxWidth, (chartWidth * spacingFactor) / numberOfDomainValues);
|
|
26253
26259
|
}
|
|
26254
26260
|
return Math.min(options.bars.maxWidth, mainXScale.step() / 2);
|
|
26255
26261
|
};
|
|
@@ -32876,18 +32882,19 @@ var radar_Radar = /** @class */ (function (_super) {
|
|
|
32876
32882
|
});
|
|
32877
32883
|
var axisLine = self.parent.select(".x-axes .x-axis-" + tools_Tools.kebabCase(datum));
|
|
32878
32884
|
var dots = self.parent.selectAll(".dots circle." + tools_Tools.kebabCase(datum));
|
|
32885
|
+
var activeDataGroupNames = self.model.getActiveDataGroupNames();
|
|
32886
|
+
var options = self.getOptions();
|
|
32887
|
+
var groupMapsTo = options.data.groupMapsTo;
|
|
32888
|
+
var valueMapsTo = tools_Tools.getProperty(options, 'radar', 'axes', 'value');
|
|
32879
32889
|
// Change style
|
|
32880
32890
|
axisLine
|
|
32881
32891
|
.classed('hovered', true)
|
|
32882
32892
|
.attr('stroke-dasharray', '4 4');
|
|
32883
32893
|
dots.classed('hovered', true)
|
|
32884
|
-
.attr('opacity', 1)
|
|
32894
|
+
.attr('opacity', function (d) { return activeDataGroupNames.indexOf(d[groupMapsTo]) !== -1 ? 1 : 0; })
|
|
32885
32895
|
.attr('r', radar.dotsRadius);
|
|
32886
32896
|
// get the items that should be highlighted
|
|
32887
|
-
var itemsToHighlight = self.fullDataNormalized.filter(function (d) { return d[angle] === datum; });
|
|
32888
|
-
var options = self.getOptions();
|
|
32889
|
-
var groupMapsTo = options.data.groupMapsTo;
|
|
32890
|
-
var valueMapsTo = tools_Tools.getProperty(options, 'radar', 'axes', 'value');
|
|
32897
|
+
var itemsToHighlight = self.fullDataNormalized.filter(function (d) { return d[angle] === datum && activeDataGroupNames.indexOf(d[groupMapsTo]) !== -1; });
|
|
32891
32898
|
// Show tooltip
|
|
32892
32899
|
self.services.events.dispatchEvent(Events.Tooltip.SHOW, {
|
|
32893
32900
|
event: event,
|
|
@@ -42986,6 +42993,13 @@ var charts_meter_extends = (undefined && undefined.__extends) || (function () {
|
|
|
42986
42993
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
42987
42994
|
};
|
|
42988
42995
|
})();
|
|
42996
|
+
var charts_meter_spreadArrays = (undefined && undefined.__spreadArrays) || function () {
|
|
42997
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
42998
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
42999
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
43000
|
+
r[k] = a[j];
|
|
43001
|
+
return r;
|
|
43002
|
+
};
|
|
42989
43003
|
// Internal Imports
|
|
42990
43004
|
|
|
42991
43005
|
|
|
@@ -43012,29 +43026,41 @@ var meter_MeterChart = /** @class */ (function (_super) {
|
|
|
43012
43026
|
return _this;
|
|
43013
43027
|
}
|
|
43014
43028
|
MeterChart.prototype.getComponents = function () {
|
|
43015
|
-
|
|
43016
|
-
var
|
|
43017
|
-
|
|
43018
|
-
|
|
43019
|
-
|
|
43020
|
-
|
|
43021
|
-
|
|
43022
|
-
|
|
43023
|
-
|
|
43024
|
-
|
|
43025
|
-
|
|
43026
|
-
|
|
43027
|
-
|
|
43028
|
-
|
|
43029
|
-
|
|
43030
|
-
|
|
43031
|
-
|
|
43032
|
-
|
|
43033
|
-
|
|
43034
|
-
|
|
43029
|
+
var showLabels = tools_Tools.getProperty(this.model.getOptions(), 'meter', 'showLabels');
|
|
43030
|
+
var meterComponents = charts_meter_spreadArrays((showLabels
|
|
43031
|
+
? [
|
|
43032
|
+
// Meter has a unique dataset title within the graph
|
|
43033
|
+
{
|
|
43034
|
+
id: 'meter-title',
|
|
43035
|
+
components: [
|
|
43036
|
+
new title_meter_MeterTitle(this.model, this.services),
|
|
43037
|
+
],
|
|
43038
|
+
growth: LayoutGrowth.STRETCH,
|
|
43039
|
+
renderType: RenderTypes.SVG,
|
|
43040
|
+
},
|
|
43041
|
+
// Create the title spacer
|
|
43042
|
+
{
|
|
43043
|
+
id: 'spacer',
|
|
43044
|
+
components: [
|
|
43045
|
+
new spacer_Spacer(this.model, this.services, {
|
|
43046
|
+
size: 8,
|
|
43047
|
+
}),
|
|
43048
|
+
],
|
|
43049
|
+
growth: LayoutGrowth.STRETCH,
|
|
43050
|
+
},
|
|
43051
|
+
]
|
|
43052
|
+
: []), [
|
|
43053
|
+
// Specify what to render inside the graph only
|
|
43054
|
+
{
|
|
43055
|
+
id: 'meter-graph',
|
|
43056
|
+
components: [new meter_Meter(this.model, this.services)],
|
|
43057
|
+
growth: LayoutGrowth.STRETCH,
|
|
43058
|
+
renderType: RenderTypes.SVG,
|
|
43059
|
+
},
|
|
43060
|
+
]);
|
|
43035
43061
|
// the graph frame for meter includes the custom title (and spacer)
|
|
43036
43062
|
var graphFrame = [
|
|
43037
|
-
new layout_LayoutComponent(this.model, this.services,
|
|
43063
|
+
new layout_LayoutComponent(this.model, this.services, meterComponents, {
|
|
43038
43064
|
direction: LayoutDirection.COLUMN,
|
|
43039
43065
|
}),
|
|
43040
43066
|
];
|