Change parameter name in the dashboard of a dynamic map

Hello everybody,

I have a quick question about renaming the dashboard parameter for a dynamic map:

The lines below abstractly sketch the problem I am having here. The function parameter that the dynamic map is based on has the name ‘a’.
Suppose in the resulting html script (after I’ve saved the dynamic map), I instead want ‘a’ to be called ‘parameter for the function’, so the application becomes easier to understand.
In that case I cannot simply rename the function parameter ‘a’ of the function ‘curve’ into ‘parameter for the function’ because the latter contains spaces. So, how do I get it to display ‘parameter for the function’ as the interactive parameter for the dynamic map when the application is saved?

def curve(a):  # some arbitrary function for a dynmic map
	curve = ...
	return curve

# The following dynamic map will have the parameter 'a' in the dashboard
# but should be named 'parameter for the function', which is not admissible as
dmap = dynamic_map(curve, kdims=["a"])

I hope my question is clear. Feel free to ask if you have any question. Any help would be greatly appreciated.

Also, if you have time, please have a look at my other question about dynamic map. Maybe you can find a workaround.
https://discourse.holoviz.org/t/dynamic-map-unable-to-switch-between-some-cases/2953/4

1 Like

2 Likes

Thanks a lot, that’s exactly what I was looking for :slight_smile:

1 Like

Is there also an easy fix for exchanging the representing value for a? For example I have a list with datetime objects and they are stored in a. Can I fix the slider that it says ‘parameter for the function: 10-06-2021’ which is like a[0]? :slight_smile: