I am trying to display distances in dash-ag-grid with Value Formatting using a suffix of miles. I want it to return “” when np.nan instead of “null miles”. Is there a way to achieve this?
Currently, i am using: "valueFormatter": {"function": "params.value + ' miles'"}
which ends up returning:
In JS, before the ? is evaluated for its truth. Params.value is testing that it exists and has a value in there. If false, this test goes to returning after the : , if true, it returns from before the :
I’d like to piggy back off this post and I can certainly make a new thread…
If I have a python array of floats with some nulls, how can I format numbers and keep nulls as blank?
There seems to be js that converts blank to 0 which is not desired.
I tried custom-functions-value-formatters, different null checks, different format properties like ‘missing’ but to no avail.
Any help would be appreciated.