1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-10-27 11:02:16 +01:00
Commit Graph

13 Commits

Author SHA1 Message Date
Thomas Heartman
5b7f069705
fix: show first date in archived to created chart (#10598)
Ensures that the first date of the data is also shown.

Before:
<img width="1144" height="441" alt="image"
src="https://github.com/user-attachments/assets/33da968a-4f44-4ca9-825e-d19471cff00a"
/>


After:
<img width="1132" height="435" alt="image"
src="https://github.com/user-attachments/assets/65d009d4-5bcb-40d0-abb6-05be81c9a361"
/>
2025-09-02 12:21:01 +00:00
Thomas Heartman
7cc3c32eb2
fix: date localizations for chart (#10581)
Adds date localization to the charts on the analytics page. In doing so,
I have extracted the default locales that we allow the user to set into
constants, so that we can reference it from other places. I have also
sorted the list and added my personal favorite format (ja) to it.

Because we have multiple charts on the analytics page, it felt weird
that only one chart should follow your preferred format. It also aligns
the existing charts' tooltip date format with the new one (`P` instead
of `PPP`).

In short: previously, the charts would show you only your system locale
(I think), which for me defaults to en-US, regardless of what setting
you'd set in your profile. Now we respect your setting as long as it's
one of the default ones.

Before (date formatting is en-US):
<img width="1444" height="1658" alt="image"
src="https://github.com/user-attachments/assets/99a893c7-efb6-4e55-b47c-9df66bf97636"
/>


After (date formatting is sv-SE):
<img width="1383" height="1653" alt="image"
src="https://github.com/user-attachments/assets/d408afd9-a8a7-46f3-8c13-9f7fde608cc4"
/>
2025-09-01 09:29:45 +00:00
Thomas Heartman
c7cb5465ff
chore: chart bar adjustments (#10555)
Updates chart bars with explicit border radii.

Before:
<img width="995" height="425" alt="image"
src="https://github.com/user-attachments/assets/d52c56a7-e022-4d27-8651-8897a49012e6"
/>


After:
<img width="1120" height="490" alt="image"
src="https://github.com/user-attachments/assets/b8660eb2-580b-48b7-8800-c5711b8a45a5"
/>
2025-09-01 10:30:27 +02:00
Thomas Heartman
5c74c34cbf
chore: Add date to archive vs creation tooltip (#10578)
Makes it easier to understand what piece of data you're looking at. The
raw date isn't available directly, but we have the formatted version for
the tooltip, so we'll display that.

This PR changes the format to be more in line with the UX sketches (just
numbers and separators instead of words). In theory, it should also be
possible to [adjust the
locale](https://www.npmjs.com/package/chartjs-adapter-date-fns#locale-support-via-scale-options)
(in this case, it should be to the user's chosen locale), but I can't
seem to make that option work. I don't want to spend more time on that
right now, unless we get feedback on it. However, _yes_ the format is
american, and _yes_, that puts months ahead of days. However, you also
have the date in longer form on the x axis, so I think you'll be able to
work it out.


Before:
<img width="279" height="139" alt="image"
src="https://github.com/user-attachments/assets/5c71e708-9d9f-412a-acbb-7d28e5071d5a"
/>


After: 
<img width="246" height="154" alt="image"
src="https://github.com/user-attachments/assets/13a4f5b3-281b-4003-8aae-a248578fead8"
/>
2025-09-01 07:19:47 +00:00
Thomas Heartman
016d269675
Chore: Use step size of 1 for created vs archived. (#10566)
You can't archive half a flag.

Closes 1-4034.
2025-08-28 15:53:04 +02:00
Thomas Heartman
b071b17dd6
Fix: created vs archived rendering errors; memoize options (#10562)
Fixes the rendering / max update depth exceeded errors we were seeing in
the console for this chart by memoizing the options.

<img width="1710" height="1420" alt="image"
src="https://github.com/user-attachments/assets/9a24d4e5-b563-4a3c-9a76-915e0a5fda24"
/>

Now the chart doesn't throw any errors anymore.
2025-08-28 14:48:53 +02:00
Thomas Heartman
9eb872de82
Show tooltip on group instead of single graph bar (#10546)
The tooltip should show you the ratio of the group and the numbers for
both archived and created.

The tooltip's position is averaged between all the bars in the group.

<img width="335" height="262" alt="image"
src="https://github.com/user-attachments/assets/d62a4bdc-ba07-4eea-8cbf-6e42793804b2"
/>


This still throws the same errors as before. Not sure exactly what's
going on with the custom tooltip, but I'll investigate it in a
follow-up.

Closes 1-4017.
2025-08-28 10:26:46 +02:00
Thomas Heartman
0cd64780fa
Simplify created numbers (don't show count by flag type) and update colors (#10531)
Simplifies the data we show for the archive vs creation chart by not
showing the created count by flag type. Instead, all we show is the
total.

Also, in doing this, updates the colors we use for the bars (to A1, and
A2). The contrast is a little low between A1 and A2, so we should look
at that before taking this into production.

The created tooltip colors are wrong, but we'll need to update the
tooltip in a later PR, so not tackling that now.

Before:
<img width="1115" height="456" alt="image"
src="https://github.com/user-attachments/assets/13626295-1aa5-42be-b8dd-cea9912effe0"
/>
<img width="564" height="311" alt="image"
src="https://github.com/user-attachments/assets/7a02eec0-e018-49fd-8b1f-92aa3376a6cc"
/>



After: 
<img width="1179" height="481" alt="image"
src="https://github.com/user-attachments/assets/1ba6584a-d7e2-4ae4-81ec-38260c1f0e07"
/>

<img width="420" height="159" alt="image"
src="https://github.com/user-attachments/assets/e4433c32-eaa4-41d2-a5ef-af84a9725c30"
/>

Closes 1-4018, 1-4013, 1-4014
2025-08-25 16:09:44 +02:00
Thomas Heartman
0223437f49
Remove ratio graph & column to the right (#10529)
This PR removes the flags archived / flags created trend line as well as
the right-hand column.

Before:
<img width="1107" height="459" alt="image"
src="https://github.com/user-attachments/assets/f6bcbef0-7b71-44c1-b8a0-db5ebaff01ed"
/>


After:
<img width="1128" height="450" alt="image"
src="https://github.com/user-attachments/assets/e55bd335-cc8c-4b88-8e3c-dafecf134742"
/>

I'm not deleting the tooltip yet, because I think we'll want to re-use
that for the group tooltip.
2025-08-25 14:27:07 +02:00
Jaanus Sellin
05ea405bf6
chore: update ux styling for lifecycle charts (#10497)
<img width="1442" height="492" alt="image"
src="https://github.com/user-attachments/assets/4ec76d72-3bfb-4525-ac63-c3e995f7638b"
/>
2025-08-15 15:23:25 +03:00
Jaanus Sellin
e43cdcf034
chore: update ux styling for lifecycle charts (#10481)
Some small ux tweaks to lifecycle charts.


1. Removed vertical lines
2. Styled the legend to have round dots, not square.
<img width="1891" height="656" alt="image"
src="https://github.com/user-attachments/assets/b2c09085-7a2e-4e14-92e0-b3e83edf201d"
/>
2025-08-08 10:25:58 +03:00
Jaanus Sellin
1d3aea47dc
feat: create flags created vs archived chart (#10429) 2025-07-31 10:54:37 +03:00
Jaanus Sellin
8943cc0a3d
feat: basic flag creation chart (#10411)
This is partial implementation of flag creation chart. This only shows
the created flags line part, but I need to style it and also add bar
charts in next PRs.

<img width="1498" height="523" alt="image"
src="https://github.com/user-attachments/assets/6d7a3145-95ff-4d31-85dd-47d687527d47"
/>
2025-07-24 14:45:16 +03:00