cx 24.10.0 → 24.10.2
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 +9 -1
- package/dist/manifest.js +522 -522
- package/dist/util.js +7 -0
- package/dist/widgets.css +19 -16
- package/package.json +1 -1
- package/src/charts/Legend.js +1 -1
- package/src/charts/LegendEntry.js +9 -1
- package/src/charts/PieChart.d.ts +92 -89
- package/src/charts/PieChart.js +529 -527
- package/src/util/Format.js +269 -261
- package/src/widgets/grid/Grid.scss +637 -680
- package/src/widgets/grid/variables.scss +133 -88
package/dist/charts.js
CHANGED
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
debug,
|
|
19
19
|
isDefined,
|
|
20
20
|
isNonEmptyArray,
|
|
21
|
+
stopPropagation,
|
|
21
22
|
closest,
|
|
22
23
|
getTopLevelBoundingClientRect,
|
|
23
24
|
Format,
|
|
@@ -851,6 +852,7 @@ var PieSlice = /*#__PURE__*/ (function (_Container) {
|
|
|
851
852
|
legend: undefined,
|
|
852
853
|
hoverId: undefined,
|
|
853
854
|
br: undefined,
|
|
855
|
+
legendDisplayText: undefined,
|
|
854
856
|
},
|
|
855
857
|
]),
|
|
856
858
|
);
|
|
@@ -930,6 +932,7 @@ var PieSlice = /*#__PURE__*/ (function (_Container) {
|
|
|
930
932
|
hoverId: data.hoverId,
|
|
931
933
|
hoverChannel: this.hoverChannel,
|
|
932
934
|
hoverSync: instance.hoverSync,
|
|
935
|
+
displayText: data.legendDisplayText,
|
|
933
936
|
onClick: function onClick(e) {
|
|
934
937
|
_this2.onLegendClick(e, instance);
|
|
935
938
|
},
|
|
@@ -1752,7 +1755,7 @@ var Legend = /*#__PURE__*/ (function (_HtmlElement) {
|
|
|
1752
1755
|
children: [
|
|
1753
1756
|
_this.renderShape(e, shape),
|
|
1754
1757
|
/*#__PURE__*/ jsx("div", {
|
|
1755
|
-
children: e.name,
|
|
1758
|
+
children: e.displayText || e.name,
|
|
1756
1759
|
}),
|
|
1757
1760
|
],
|
|
1758
1761
|
},
|
|
@@ -1884,6 +1887,7 @@ var LegendEntry = /*#__PURE__*/ (function (_Container) {
|
|
|
1884
1887
|
if ((any || this.legendAction == "select") && !this.selection.isDummy) this.selection.selectInstance(instance);
|
|
1885
1888
|
};
|
|
1886
1889
|
_proto.render = function render(context, instance, key) {
|
|
1890
|
+
var _this = this;
|
|
1887
1891
|
var data = instance.data;
|
|
1888
1892
|
var content = !isUndefined(this.text) ? data.text : this.renderChildren(context, instance);
|
|
1889
1893
|
return /*#__PURE__*/ jsxs(
|
|
@@ -1891,6 +1895,10 @@ var LegendEntry = /*#__PURE__*/ (function (_Container) {
|
|
|
1891
1895
|
{
|
|
1892
1896
|
className: data.classNames,
|
|
1893
1897
|
style: data.style,
|
|
1898
|
+
onMouseDown: stopPropagation,
|
|
1899
|
+
onClick: function onClick(e) {
|
|
1900
|
+
_this.handleClick(e, instance);
|
|
1901
|
+
},
|
|
1894
1902
|
children: [
|
|
1895
1903
|
this.renderShape(instance),
|
|
1896
1904
|
content != null &&
|