@vizzly/dashboard 0.15.0-dev-a0c2e94601580e6492c72e10cbc684c57074babe → 0.15.0-dev-ec22f31a049b4f844d3ea606a85bd487c4553b03
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.
|
@@ -53055,8 +53055,10 @@ var SunburstChartView = function SunburstChartView(props) {
|
|
|
53055
53055
|
setTooltipLabel = _useState5[1];
|
|
53056
53056
|
var xScale = d3Scale.scaleLinear().domain(xDomain).range(xRange);
|
|
53057
53057
|
var yScale = d3Scale.scaleSqrt().domain(yDomain).range(yRange);
|
|
53058
|
-
var width = props.width * 3 /
|
|
53059
|
-
var height =
|
|
53058
|
+
var width = props.width * 3 / 6;
|
|
53059
|
+
var height = props.height * 0.9;
|
|
53060
|
+
var minDimension = Math.min(props.width, props.height);
|
|
53061
|
+
var centeredRatio = minDimension / 2.5;
|
|
53060
53062
|
var sunburstChartComponent = getComponentInterface(props.attributes.type);
|
|
53061
53063
|
var headerProps = {
|
|
53062
53064
|
displayTitle: props.attributes.displayTitle,
|
|
@@ -53076,8 +53078,8 @@ var SunburstChartView = function SunburstChartView(props) {
|
|
|
53076
53078
|
order: props.attributes.order
|
|
53077
53079
|
};
|
|
53078
53080
|
React.useEffect(function () {
|
|
53079
|
-
setYRange([yRange[0],
|
|
53080
|
-
}, [
|
|
53081
|
+
setYRange([yRange[0], centeredRatio]);
|
|
53082
|
+
}, [centeredRatio]);
|
|
53081
53083
|
var arc = d3Shape.arc().startAngle(function (d) {
|
|
53082
53084
|
return Math.max(0, Math.min(2 * Math.PI, xScale(d.x0)));
|
|
53083
53085
|
}).endAngle(function (d) {
|
|
@@ -53090,7 +53092,7 @@ var SunburstChartView = function SunburstChartView(props) {
|
|
|
53090
53092
|
var handleClick = function handleClick(d) {
|
|
53091
53093
|
setXDomain([d.x0, d.x1]);
|
|
53092
53094
|
setYDomain([d.y0, 1]);
|
|
53093
|
-
setYRange([d.y0 ? 20 : 0,
|
|
53095
|
+
setYRange([d.y0 ? 20 : 0, centeredRatio]);
|
|
53094
53096
|
};
|
|
53095
53097
|
var handleUpdate = function handleUpdate(t, xd, yd, yr) {
|
|
53096
53098
|
xScale.domain(xd(t));
|
|
@@ -53177,7 +53179,7 @@ var SunburstChartView = function SunburstChartView(props) {
|
|
|
53177
53179
|
height: height,
|
|
53178
53180
|
children: jsxRuntime.jsx(Partition, {
|
|
53179
53181
|
top: 0,
|
|
53180
|
-
left: centerX
|
|
53182
|
+
left: centerX + DEFAULT_MARGINS.left,
|
|
53181
53183
|
root: root,
|
|
53182
53184
|
children: jsxRuntime.jsx(web.Spring, {
|
|
53183
53185
|
reset: true,
|