@carbon/charts-vue 0.54.10 → 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 CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [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
+
6
14
  ## [0.54.10](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.9...v0.54.10) (2022-01-27)
7
15
 
8
16
  **Note:** Version bump only for package @carbon/charts-vue
@@ -8759,6 +8759,7 @@ var meterChart = tools_Tools.merge({}, chart, {
8759
8759
  clickable: false,
8760
8760
  },
8761
8761
  meter: {
8762
+ showLabels: true,
8762
8763
  proportional: null,
8763
8764
  statusBar: {
8764
8765
  percentageIndicator: {
@@ -42992,6 +42993,13 @@ var charts_meter_extends = (undefined && undefined.__extends) || (function () {
42992
42993
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
42993
42994
  };
42994
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
+ };
42995
43003
  // Internal Imports
42996
43004
 
42997
43005
 
@@ -43018,29 +43026,41 @@ var meter_MeterChart = /** @class */ (function (_super) {
43018
43026
  return _this;
43019
43027
  }
43020
43028
  MeterChart.prototype.getComponents = function () {
43021
- // Specify what to render inside the graph only
43022
- var graph = {
43023
- id: 'meter-graph',
43024
- components: [new meter_Meter(this.model, this.services)],
43025
- growth: LayoutGrowth.STRETCH,
43026
- renderType: RenderTypes.SVG,
43027
- };
43028
- // Meter has an unique dataset title within the graph
43029
- var titleComponent = {
43030
- id: 'meter-title',
43031
- components: [new title_meter_MeterTitle(this.model, this.services)],
43032
- growth: LayoutGrowth.STRETCH,
43033
- renderType: RenderTypes.SVG,
43034
- };
43035
- // create the title spacer
43036
- var titleSpacerComponent = {
43037
- id: 'spacer',
43038
- components: [new spacer_Spacer(this.model, this.services, { size: 8 })],
43039
- growth: LayoutGrowth.STRETCH,
43040
- };
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
+ ]);
43041
43061
  // the graph frame for meter includes the custom title (and spacer)
43042
43062
  var graphFrame = [
43043
- new layout_LayoutComponent(this.model, this.services, [titleComponent, titleSpacerComponent, graph], {
43063
+ new layout_LayoutComponent(this.model, this.services, meterComponents, {
43044
43064
  direction: LayoutDirection.COLUMN,
43045
43065
  }),
43046
43066
  ];