Internal Component

This component is intended solely for use within GitHub and is not available for external use.

Props

ChartCard

NameDefaultDescription
size
"medium"
Size

The chart’s height (which affects its width and the card’s size). The following presets are supported: "xl", "large", "medium", "small", or "sparkline". Arbitrary numbers are also supported (for custom chart heights, in pixels). When set to "sparkline", the chart’s title, description, menu, padding, and border are hidden.

border
true
boolean

Whether the card has a border. When set to false, the card has no border.

padding
"normal"
"normal" | "none" | "spacious"

Whether the card has padding. When set to "none", the card has no padding.

visibleControls
true
boolean

Whether the chart menu is visible. When set to false, the chart menu is hidden.

visibleChartOptions
true
boolean

Whether the chart options button is visible. When set to false, the chart options button is hidden.

className
string

Additional classes to apply to the card.

children Required
React.ReactNode

The card’s content. Supported subcomponents:

  • ChartCard.LeadingVisual,
  • ChartCard.Title,
  • ChartCard.Description,
  • ChartCard.TrailingVisual, and
  • ChartCard.Chart.
chartRef
React.RefObject<any>