MCPcopy Index your code
hub / github.com/ChartGPU/ChartGPU / styleAxisLabelSpan

Function styleAxisLabelSpan

src/utils/axisLabelStyling.ts:31–44  ·  view source on GitHub ↗
(
  span: HTMLSpanElement,
  label: AxisLabel,
  theme: AxisLabelThemeConfig
)

Source from the content-addressed store, hash-verified

29 * Applies consistent styling to an axis label span element.
30 */
31export function styleAxisLabelSpan(
32 span: HTMLSpanElement,
33 label: AxisLabel,
34 theme: AxisLabelThemeConfig
35): void {
36 // Set inline styles
37 span.dir = 'auto';
38 span.style.fontFamily = theme.fontFamily;
39
40 // Axis titles are bold
41 if (label.isTitle) {
42 span.style.fontWeight = '600';
43 }
44}
45
46/**
47 * Adds axis labels to a text overlay with consistent styling.

Callers 2

renderFunction · 0.90
addAxisLabelsToOverlayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected