# Does useFieldConfig support to change default threshold?

**URL:** <https://community.grafana.com/t/does-usefieldconfig-support-to-change-default-threshold/36224>\
**Category:** Grafana\
**Created:** [September 7, 2020, 11:22am UTC](https://community.grafana.com/t/does-usefieldconfig-support-to-change-default-threshold/36224 "2020-09-07T11:22:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimchen1](https://avatars.discourse-cdn.com/v4/letter/j/a4c791/32.png) [@jimchen1](https://community.grafana.com/u/jimchen1)\
**Post date:** [September 7, 2020, 11:22am UTC](https://community.grafana.com/t/does-usefieldconfig-support-to-change-default-threshold/36224/1 "2020-09-07T11:22:36Z")

</div>

Hi there,

Can we assign default thresholds by the plugin function useFieldConfig? I tried but didn’t work.

I found if I assign FieldConfigProperty.Thresholds in standardOptions, the UI will only display Threshold editor. Not sure if it is possible to configure default threshold in custom panel plugin

---

<div class="post-metadata">

**Author:** ![butkovv1991](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@butkovv1991](https://community.grafana.com/u/butkovv1991)\
**Post date:** [November 28, 2024, 9:31am UTC](https://community.grafana.com/t/does-usefieldconfig-support-to-change-default-threshold/36224/2 "2024-11-28T09:31:10Z")

</div>

Bump. Ran into the same issue the other day. useFieldConfig won’t let me change default settings for Thresholds, but it does allow to add arbitrary values. For example this configuration will not have any effect whatsoever:

.useFieldConfig(  
{  
standardOptions: {  
[FieldConfigProperty.Thresholds]: {  
defaultValue: {  
mode: ThresholdsMode.Absolute,  
steps: [  
{  
color: “green”,  
value: -1000,  
},  
{  
color: “red”,  
value: 1,  
}  
],  
}  
},  
}  
}  
)

but if you specify any other field in the default value object, it will be available. It looks like mode and steps fields are read-only. I have no problem changing other properties (Decimals for example). Package versions in the package.json:  
“@grafana/data”: “10.3.3”,  
“@grafana/runtime”: “10.3.3”,  
“@grafana/schema”: “10.3.3”,  
“@grafana/ui”: “10.3.3”,
