mirror of
https://github.com/jez500/pricebuddy.git
synced 2026-11-24 19:58:13 +01:00
26 lines
718 B
PHP
26 lines
718 B
PHP
@php
|
|
$height = $height ?? '50px';
|
|
@endphp
|
|
<div>
|
|
<div
|
|
style="height: {{ $height }}"
|
|
id="{{ uniqid('chart-wrapper-'.$product->getKey().'-') }}"
|
|
x-load
|
|
x-data="pbChart({
|
|
cachedData: @js($cachedDatasets),
|
|
options: @js($options),
|
|
type: @js($type),
|
|
})"
|
|
{{ $attributes->merge(['class' => 'relative']) }}
|
|
>
|
|
<canvas
|
|
role="img"
|
|
aria-label="Price history chart for {{ $product->name ?? 'product' }}"
|
|
class="absolute inset-0 top-1 bottom-1 rounded-br-lg"
|
|
x-ref="canvas"
|
|
id="{{ uniqid('chart-canvas-'.$product->getKey().'-') }}"
|
|
></canvas>
|
|
</div>
|
|
</div>
|
|
|