trait HasChartStyling

Properties

string|null $title
bool $border
string|null $borderColor
string|null $backgroundColor
mixed $chartColor

Methods

void
initializeChartStyling(string|null $title = null, bool $border = true, string|null $borderColor = null, string|null $backgroundColor = null, mixed $chartColor = null)

No description

array
getStylingVariables()

No description

bool
isCssColor(string $color)

No description

bool
isTailwindClass(string $color)

No description

array
getColorPalette()

No description

string|null
getTailwindColorValue(string $colorName)

Convert internal palette color names to CSS hex values.

Details

at line 13
protected void initializeChartStyling(string|null $title = null, bool $border = true, string|null $borderColor = null, string|null $backgroundColor = null, mixed $chartColor = null)

No description

Parameters

string|null $title
bool $border
string|null $borderColor
string|null $backgroundColor
mixed $chartColor

Return Value

void

at line 27
protected array getStylingVariables()

No description

Return Value

array

at line 37
protected bool isCssColor(string $color)

No description

Parameters

string $color

Return Value

bool

at line 44
protected bool isTailwindClass(string $color)

No description

Parameters

string $color

Return Value

bool

at line 55
protected array getColorPalette()

No description

Return Value

array

at line 81
protected string|null getTailwindColorValue(string $colorName)

Convert internal palette color names to CSS hex values.

This prevents dynamic Tailwind class construction which doesn't work with JIT compilation.

Parameters

string $colorName

The color name (e.g., 'blue', 'red')

Return Value

string|null

The hex color value or null if not found