@carbon/charts-vue 0.55.1 → 0.56.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/charts-vue.umd.js CHANGED
@@ -8544,7 +8544,7 @@ var axisChart = tools_Tools.merge({}, chart, {
8544
8544
  var baseBarChart = tools_Tools.merge({}, axisChart, {
8545
8545
  bars: {
8546
8546
  maxWidth: 16,
8547
- spacingFactor: 0.25
8547
+ spacingFactor: 0.25,
8548
8548
  },
8549
8549
  timeScale: tools_Tools.merge(timeScale, {
8550
8550
  addSpaceOnEdges: 1,
@@ -8837,6 +8837,7 @@ var alluvialChart = tools_Tools.merge({}, chart, {
8837
8837
  data: tools_Tools.merge(chart.data, {
8838
8838
  groupMapsTo: 'source',
8839
8839
  }),
8840
+ nodeAlignment: Alignments.CENTER,
8840
8841
  nodePadding: 24,
8841
8842
  monochrome: false,
8842
8843
  nodes: [],
@@ -34722,11 +34723,21 @@ var alluvial_Alluvial = /** @class */ (function (_super) {
34722
34723
  if (options.alluvial.nodePadding > alluvial.minNodePadding) {
34723
34724
  nodePadding = options.alluvial.nodePadding;
34724
34725
  }
34726
+ var alignment = tools_Tools.getProperty(options, 'alluvial', 'nodeAlignment');
34727
+ var nodeAlignment = justify;
34728
+ if (alignment === Alignments.LEFT) {
34729
+ nodeAlignment = align_left;
34730
+ }
34731
+ else if (alignment === Alignments.RIGHT) {
34732
+ nodeAlignment = align_right;
34733
+ }
34725
34734
  var sankey = Sankey()
34726
34735
  .nodeId(function (d) { return d.name; })
34727
34736
  .nodeWidth(alluvial.nodeWidth)
34728
34737
  // Distance nodes are apart from each other
34729
34738
  .nodePadding(nodePadding)
34739
+ // Alignment of nodes within chart
34740
+ .nodeAlign(nodeAlignment)
34730
34741
  // Size of the chart and its padding
34731
34742
  // Chart starts at 2 and ends at width - 2 so the outer nodes can expand from center
34732
34743
  // Chart starts from 30 so node categories can be displayed