From 208ff6d413d5d229b94cdc09c95f3abd9391b7cb Mon Sep 17 00:00:00 2001 From: Adrian Gruntkowski Date: Mon, 30 Oct 2023 15:08:35 +0100 Subject: [PATCH] Extend moduledoc in visitors component --- lib/plausible_web/live/components/visitors.ex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/plausible_web/live/components/visitors.ex b/lib/plausible_web/live/components/visitors.ex index ba2db53a3..46e6d30de 100644 --- a/lib/plausible_web/live/components/visitors.ex +++ b/lib/plausible_web/live/components/visitors.ex @@ -1,15 +1,15 @@ defmodule PlausibleWeb.Live.Components.Visitors do @moduledoc """ Component rendering mini-graph of site's visitors over the last 24 hours. + + The `gradient_defs` component should be rendered once before using `chart` + one or more times. + + Accepts input generated via `Plausible.Stats.Clickhouse.last_24h_visitors_hourly_intervals/2`. """ use Phoenix.Component - # Proof of concept, TODOs: - # - make it asynchronous, - # - move under Live.Components or .Components depending on how it turns out, - # - make it render once per site - currently both mounts call it - attr :intervals, :list, required: true attr :height, :integer, default: 50 attr :tick, :integer, default: 20