- 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
20 lines
548 B
HTML
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>
|