mirror of
https://github.com/plausible/analytics.git
synced 2024-12-23 17:44:43 +03:00
Show 0% change on the small plot (#3478)
* Show 0% change on the small plot * Fix more cut-off * ws
This commit is contained in:
parent
6148f4ad61
commit
30b4dc2872
@ -38,7 +38,7 @@ defmodule PlausibleWeb.Live.Components.Visitors do
|
||||
|> assign(:id, Ecto.UUID.generate())
|
||||
|
||||
~H"""
|
||||
<svg viewBox={"0 -1 #{(@points_len - 1) * @tick} #{@height + 2}"} class="chart w-full mb-2">
|
||||
<svg viewBox={"0 -1 #{(@points_len - 1) * @tick} #{@height + 3}"} class="chart w-full mb-2">
|
||||
<defs>
|
||||
<clipPath id={"gradient-cut-off-#{@id}"}>
|
||||
<polyline points={@clip_points} />
|
||||
|
@ -258,7 +258,8 @@ defmodule PlausibleWeb.Live.Sites do
|
||||
|
||||
def percentage_change(assigns) do
|
||||
~H"""
|
||||
<p :if={@change != 0} class="dark:text-gray-100">
|
||||
<p class="dark:text-gray-100">
|
||||
<span :if={@change == 0} class="font-semibold text-green-500">〰</span>
|
||||
<span :if={@change > 0} class="font-semibold text-green-500">↑</span>
|
||||
<span :if={@change < 0} class="font-semibold text-red-400">↓</span>
|
||||
<%= abs(@change) %>%
|
||||
|
Loading…
Reference in New Issue
Block a user