GithubHelp home page GithubHelp logo

Version 4.0.1: Unable to adjust the size of a chart in a dashboard when the chart touches the right edge of the dashboard about superset HOT 4 OPEN

Kim-frau avatar Kim-frau commented on June 26, 2024
Version 4.0.1: Unable to adjust the size of a chart in a dashboard when the chart touches the right edge of the dashboard

from superset.

Comments (4)

dosubot avatar dosubot commented on June 26, 2024 2

Hey there, @Kim-frau! I'm here to help you with your Superset issue. I'm a bot designed to assist with bugs, questions, and contributions while waiting for a human maintainer. Let's work together to solve this problem!

To adjust the size of a chart in a Superset 4.0.1 dashboard without deleting and re-importing the chart, you can use the ResizableContainer component. This component allows you to resize the chart by dragging its edges. Here is the relevant part of the code that handles resizing:

<ResizableContainer
  id={component.id}
  adjustableWidth={parentComponent.type === ROW_TYPE}
  adjustableHeight
  widthStep={columnWidth}
  widthMultiple={widthMultiple}
  heightStep={GRID_BASE_UNIT}
  heightMultiple={component.meta.height}
  minWidthMultiple={GRID_MIN_COLUMN_COUNT}
  minHeightMultiple={GRID_MIN_ROW_UNITS}
  maxWidthMultiple={availableColumnCount + widthMultiple}
  onResizeStart={onResizeStart}
  onResize={onResize}
  onResizeStop={onResizeStop}
  editMode={editMode}
>

This component provides the ability to adjust both the width and height of the chart. You can drag the edges of the chart to resize it as needed. The onResizeStart, onResize, and onResizeStop callbacks handle the resizing events [1].

To continue talking to Dosu, mention @dosu.

from superset.

sebint avatar sebint commented on June 26, 2024 1

Yes unable to resize if it is stretched to right most side of dashboard. But if we try to drag from the right bottom corner the drag handler appears. @Kim-frau, have you got any solution?

from superset.

Kim-frau avatar Kim-frau commented on June 26, 2024

Good point, I just tried it, it works. It is the best solution I have got yet

from superset.

rusackas avatar rusackas commented on June 26, 2024

@justinpark might have some ideas on this one.

from superset.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.