@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.
@@ -53113,8 +53113,10 @@ var SunburstChartView = function SunburstChartView(props) {
53113
53113
  setTooltipLabel = _useState5[1];
53114
53114
  var xScale = scaleLinear$1().domain(xDomain).range(xRange);
53115
53115
  var yScale = scaleSqrt().domain(yDomain).range(yRange);
53116
- var width = props.width * 3 / 5;
53117
- var height = 500;
53116
+ var width = props.width * 3 / 6;
53117
+ var height = props.height * 0.9;
53118
+ var minDimension = Math.min(props.width, props.height);
53119
+ var centeredRatio = minDimension / 2.5;
53118
53120
  var sunburstChartComponent = getComponentInterface(props.attributes.type);
53119
53121
  var headerProps = {
53120
53122
  displayTitle: props.attributes.displayTitle,
@@ -53134,8 +53136,8 @@ var SunburstChartView = function SunburstChartView(props) {
53134
53136
  order: props.attributes.order
53135
53137
  };
53136
53138
  useEffect(function () {
53137
- setYRange([yRange[0], width / 2]);
53138
- }, [width]);
53139
+ setYRange([yRange[0], centeredRatio]);
53140
+ }, [centeredRatio]);
53139
53141
  var arc$1 = arc().startAngle(function (d) {
53140
53142
  return Math.max(0, Math.min(2 * Math.PI, xScale(d.x0)));
53141
53143
  }).endAngle(function (d) {
@@ -53148,7 +53150,7 @@ var SunburstChartView = function SunburstChartView(props) {
53148
53150
  var handleClick = function handleClick(d) {
53149
53151
  setXDomain([d.x0, d.x1]);
53150
53152
  setYDomain([d.y0, 1]);
53151
- setYRange([d.y0 ? 20 : 0, width / 2]);
53153
+ setYRange([d.y0 ? 20 : 0, centeredRatio]);
53152
53154
  };
53153
53155
  var handleUpdate = function handleUpdate(t, xd, yd, yr) {
53154
53156
  xScale.domain(xd(t));
@@ -53235,7 +53237,7 @@ var SunburstChartView = function SunburstChartView(props) {
53235
53237
  height: height,
53236
53238
  children: jsx(Partition, {
53237
53239
  top: 0,
53238
- left: centerX * 2 / 3,
53240
+ left: centerX + DEFAULT_MARGINS.left,
53239
53241
  root: root,
53240
53242
  children: jsx(Spring, {
53241
53243
  reset: true,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vizzly/dashboard",
3
3
  "author": "james@vizzly.co",
4
- "version": "0.15.0-dev-a0c2e94601580e6492c72e10cbc684c57074babe",
4
+ "version": "0.15.0-dev-ec22f31a049b4f844d3ea606a85bd487c4553b03",
5
5
  "source": "src/index.tsx",
6
6
  "types": "./dist/dashboard/src/index.d.ts",
7
7
  "module": "./dist/dashboard.esm.js",