cx 23.4.5 → 23.5.1

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/dist/charts.js CHANGED
@@ -902,7 +902,7 @@ PieSlice.prototype.legend = "legend";
902
902
  PieSlice.prototype.active = true;
903
903
  PieSlice.prototype.stack = "stack";
904
904
  PieSlice.prototype.legendAction = "auto";
905
- PieSlice.prototype.legendShape = "rect";
905
+ PieSlice.prototype.legendShape = "circle";
906
906
  PieSlice.prototype.hoverChannel = "default";
907
907
  PieSlice.prototype.styled = true;
908
908
  Widget.alias("pie-chart", PieChart);
@@ -1544,6 +1544,17 @@ var Legend = /*#__PURE__*/ (function (_HtmlElement) {
1544
1544
  });
1545
1545
  _HtmlElement.prototype.prepareData.call(this, context, instance);
1546
1546
  };
1547
+ _proto.declareData = function declareData() {
1548
+ var _HtmlElement$prototyp;
1549
+ (_HtmlElement$prototyp = _HtmlElement.prototype.declareData).call.apply(
1550
+ _HtmlElement$prototyp,
1551
+ [this].concat(Array.prototype.slice.call(arguments), [
1552
+ {
1553
+ shape: undefined,
1554
+ },
1555
+ ])
1556
+ );
1557
+ };
1547
1558
  _proto.isValidHtmlAttribute = function isValidHtmlAttribute(attrName) {
1548
1559
  switch (attrName) {
1549
1560
  case "shapeSize":
@@ -1599,7 +1610,7 @@ var Legend = /*#__PURE__*/ (function (_HtmlElement) {
1599
1610
  onClick: e.onClick,
1600
1611
  onMouseMove: onMouseMove,
1601
1612
  onMouseLeave: onMouseLeave,
1602
- children: [_this.renderShape(e), e.name],
1613
+ children: [_this.renderShape(e, instance.data.shape), e.name],
1603
1614
  },
1604
1615
  i
1605
1616
  );
@@ -1611,7 +1622,7 @@ var Legend = /*#__PURE__*/ (function (_HtmlElement) {
1611
1622
  }
1612
1623
  return [list, _HtmlElement.prototype.renderChildren.call(this, context, instance)];
1613
1624
  };
1614
- _proto.renderShape = function renderShape(entry) {
1625
+ _proto.renderShape = function renderShape(entry, legendEntriesShape) {
1615
1626
  var _this$CSS$element;
1616
1627
  var className = this.CSS.element(
1617
1628
  this.baseClass,
@@ -1621,7 +1632,7 @@ var Legend = /*#__PURE__*/ (function (_HtmlElement) {
1621
1632
  entry.colorIndex != null && (isUndefined(entry.active) || entry.active)),
1622
1633
  _this$CSS$element)
1623
1634
  );
1624
- var shape = getShape(entry.shape || "square");
1635
+ var shape = getShape(legendEntriesShape || entry.shape || "square");
1625
1636
  return /*#__PURE__*/ jsx("svg", {
1626
1637
  className: this.CSS.element(this.baseClass, "svg"),
1627
1638
  style: {
@@ -1642,6 +1653,7 @@ Legend.prototype.baseClass = "legend";
1642
1653
  Legend.prototype.vertical = false;
1643
1654
  Legend.prototype.memoize = false;
1644
1655
  Legend.prototype.shapeSize = 18;
1656
+ Legend.prototype.shape = null;
1645
1657
  Legend.prototype.svgSize = 20;
1646
1658
  Widget.alias("legend", Legend);
1647
1659
  Legend.Scope = /*#__PURE__*/ (function (_PureContainer) {