Add price-chart jsx template

This commit is contained in:
2026-08-20 22:48:17 +00:00
parent e90cc88371
commit 6c2da714f2
@@ -0,0 +1,20 @@
---
label: price-chart voorbeeld
description: Prijsgrafiek met forecast-overlay
type: price-chart
author: maik
---
import React from 'react';
export default function PriceChartTemplate({ data }) {
const prices = data?.prices ?? [];
const max = Math.max(...prices, 1);
return (
<div className="widget-price-chart">
{prices.map((p, i) => (
<div key={i} className="bar" style={{ height: `${(p / max) * 100}%` }} />
))}
</div>
);
}