BubbleChart
Bubble chart component
Import
Source
Docs
Package
Usage
Change color
You can reference colors from theme the same way as in
other components, for example, blue
, red.5
, orange.7
, etc. Any valid CSS
color value is also accepted.
Change area color depending on color scheme
You can use CSS variables in color
property. To define a CSS variable that
changes depending on the color scheme, use light/dark mixins
or light-dark function. Example
of area that is dark orange in light mode and lime in dark mode:
Remove tooltip
To remove tooltip, set withTooltip={false}
. It also removes the cursor line
and disables interactions with the chart.
Value formatter
To format values in the tooltip, use valueFormat
prop. It accepts
a function that takes number value as an argument and returns formatted value:
Grid and text colors
Use --chart-grid-color
and --chart-text-color
to change colors of
grid lines and text within the chart. With CSS modules, you can change colors
depending on color scheme:
If your application has only one color scheme, you can use gridColor
and textColor
props instead of CSS variables: