Skip to content

Comments

SNT-294 users can define scales with a UI in which they can select range and colors#194

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

SNT-294 users can define scales with a UI in which they can select range and colors#194
Bewi merged 7 commits intomainfrom
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 a IASO PR modifying the API part here: BLSQ/iaso#2762

Doc

N/A

legendType: string;
};

const list_field_key = 'legend_config';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ALL CAPS!

@Bewi Bewi merged commit f4a04b8 into main Feb 23, 2026
2 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 23, 2026 10:22
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