diff --git a/assets/html/base.html b/assets/html/base.html
index 5fa04e8..ed9f9b3 100644
--- a/assets/html/base.html
+++ b/assets/html/base.html
@@ -25,6 +25,54 @@
>
+{% macro alive_time_chart(entity_id, chart_data) -%}
+
+ new Chart("time_in_game_{{entity_id}}", {
+ type: "pie",
+ data: {
+ labels: ["In game", "Eliminated"],
+ datasets: [{
+ backgroundColor: ["#00ff00", "#000000"],
+ data: {{ chart_data }}
+ }]
+ },
+ options: {
+ legend: {
+ display: false,
+ fullSize: false
+ },
+ title: {
+ display: false,
+ }
+ }
+ });
+
+{%- endmacro %}
+
+{% macro uptime_chart(entity_id, state_distribution) -%}
+
+ new Chart("uptime_{{entity_id}}", {
+ type: "pie",
+ data: {
+ labels: {{ state_distribution.labels }},
+ datasets: [{
+ backgroundColor: {{ state_distribution.colors }},
+ data: {{ state_distribution.data }}
+ }]
+ },
+ options: {
+ legend: {
+ display: false,
+ fullSize: false
+ },
+ title: {
+ display: false,
+ }
+ }
+ });
+
+ {%- endmacro %}
+