Skip to content

Comments

Snt 294 users can define scales with a UI in which they can select range and colors#2762

Merged
Bewi merged 3 commits intodevelopfrom
SNT-294-users-can-define-scales-with-a-ui-in-which-they-can-select-range-and-colors
Feb 20, 2026
Merged

Snt 294 users can define scales with a UI in which they can select range and colors#2762
Bewi merged 3 commits intodevelopfrom
SNT-294-users-can-define-scales-with-a-ui-in-which-they-can-select-range-and-colors

Conversation

@Bewi
Copy link
Contributor

@Bewi Bewi commented Feb 20, 2026

What problem is this PR solving?

Replace json text field to a custom component for metric type scales

Related JIRA tickets

SNT-294

Changes

  • Added a new form for legend_config of a metric type.
  • Modified B-E to accept this input instead of a json string
  • Add limits on array items based on legend_type

How to test

Go to SNT with an admin account (you can setup BFA dummy account).
Go to settings (on the burger navigation) which will bring you to the Layer tab of the settings.
From there, you can create a metric type (aka layer).
Try to play with the legend it should:

  • Have two items by default
  • Have type threshold by default
  • Should not allow less than 2 items
  • Should not allow more than 9 item for threshold, 4 for ordinal and 2 for linear.
  • Should show an error if a value is already defined
  • For threshold and linear, it should only accept numbers
  • For ordinal it should allow strings

Print screen / video

image

Notes

There is an SNT PR for the FE part: BLSQ/snt-malaria#194

Doc

N/A

@Bewi Bewi merged commit 1f3cfa8 into develop Feb 20, 2026
7 checks passed
@Bewi Bewi deleted the SNT-294-users-can-define-scales-with-a-ui-in-which-they-can-select-range-and-colors branch February 20, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants