How to use FieldConfig units setting in my datasource

Does anyone have an idea how to use the FieldConfig units property? I have a datasource which pulls from a backend service. I want to set the default units setting in the dataframe. Does anyone have some sample code on how to make that happen?

Any assistance would be greatly appreciated.