ResponsiveContainer

A container component to make charts adapt to the size of parent container. One of the props width and height should be a percentage string.

Child Components

Properties

  • aspect Numberoptional

    width / height. If specified, the height will be calculated by width / aspect.

  • widthPercentage | Number

    The percentage value of the chart's width or a fixed width.

    DEFAULT: '100%'

  • heightPercentage | Number

    The percentage value of the chart's width or a fixed height.

    DEFAULT: '100%'

  • minWidthNumberoptional

    The minimum width of the container.

  • minHeightNumberoptional

    The minimum height of the container.

  • debounceNumber

    If specified a positive number, debounced function will be used to handle the resize event.

    DEFAULT: 0

  • onResizeFunctionoptional

    If specified provides a callback providing the updated chart width and height values.