baseddata.io/layouts/shortcodes/chart.html
Sam eb6f97f54a Add miner rewards functionality and update chart methods
- Add `miner_rewards` function in `pipelines.py` to fetch data based on `days_ago`
- Update `route.py` to include `/miner_rewards` endpoint and handle data serialization
- Add `miner_rewards_schema` in `schemas.py` for serializing miner rewards data
- Modify charts shortcode to include method for multiple chart methods
2024-12-27 19:22:42 +00:00

20 lines
548 B
HTML

{{ partial "chart.html" }}
<section class = 'chart-container'>
<div class = "chart" id='{{ .Get "id" }}'>
<script>
document.addEventListener("DOMContentLoaded", function () {
{{ .Get "chartMethod" | safeJS }}(
id={{ .Get "id" }},
endpoint={{ .Get "endpoint" }},
chartType={{ .Get "chartType" }},
xAxisField={{ .Get "xAxisField" }},
yAxisField={{ .Get "yAxisField" }},
sortField={{ .Get "sortField" }},
scaleChart={{ .Get "scaleChart" }},
xAxisType={{ .Get "xAxisType" }})
});
</script>
</div>
</section>