You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import LinkTo from '@storybook/addon-links/react';
import { Meta } from '@storybook/react';
Customization
Some design aspects of the visualizations, such as the font-size of the tick labels, the color of the title, the color of the axes, etc. are controlled by CSS.
We provide sane defaults that should be sufficient to start with, but at some point
you might like to tweak a few things so the visualizations integrate better with your app's design.
Inherited font properties
Font properties (font-size, font-family, font-weight, etc.) of textual elements (tick labels, plot title, etc.) are inherited by default, so tweaking them all at once is easy.
Story Inherited Styles demonstrates this technique. For instance, if you'd like to change the font-size and font-family of the LineVis, here is what you could do:
For more advanced customization, the library exposes a number of CSS custom properties, which you may use
as you see fit. For instance, if you'd like to change the color of the curve of the LineVis, here is what you could do:
.my-container {
--h5w-line--color: teal;
}
/* If you want every `LineVis` in your app to have the same curve color, you could even use `:root` */:root {
--h5w-line--color: teal;
}
Color(s) of auxiliary curves. Accepts a comma-separated list of colors. If the number of colours is lower than the number of auxiliary curves, the last color in the list is used.
Heatmap
Name
Default
Description
--h5w-colorBar-ticks--color
var(--h5w-ticks--color, gray)
Color of color bar ticks
--h5w-colorBar-tickLabels--color
var(--h5w-tickLabels--color, #333)
Text color of color bar tick labels
--h5w-colorBar-tickLabels--fontFamily
var(--h5w-tickLabels--fontFamily, inherit)
Font family of color bar tick labels
--h5w-colorBar-tickLabels--fontSize
0.75em
Font size of color bar tick labels
--h5w-colorBar-bounds--color
#333
Font size of color bar min and max bounds
--h5w-colorBar-bounds--fontSize
0.875em
Font size of color bar min and max bounds
Matrix
Name
Default
Description
--h5w-matrix--color
inherit
Text color of matrix vis
--h5w-matrix--fontFamily
monospace
Font family of matrix vis
--h5w-matrix--fontSize
inherit
Font size of matrix vis
--h5w-matrix-cell--bgColor
transparent
Background colour of even cells
--h5w-matrix-cell--bgColorAlt
#eee
Background colour of odd cells
--h5w-matrix-indexCell--bgColor
#eee
Background colour of even index cells
--h5w-matrix-indexCell--bgColorAlt
lightgray
Background colour of odd index cells
--h5w-matrix-indexCell--color
var(--h5w-matrix--color, inherit)
Text color of index cells
--h5w-matrix-indexCell--fontFamily
var(--h5w-matrix--fontFamily, monospace)
Font family of index cells
--h5w-matrix-indexCell--fontSize
var(--h5w-matrix--fontSize, inherit)
Font size of index cells
--h5w-matrix-indexCell--fontWeight
600
Font weight of index cells
--h5w-matrix-anchorCell--bgColor
silver
Background colour of anchor cell
UI
Name
Default
Description
--h5w-error--color
brown
Color of error messages and UI elements in error state