It pretty frequently happens that some bit of data or customdata is null and this results in ugly hoverlabels when using texttemplate (we end up seeing the template text instead!). One option would be simply to not render the template directive when it evaluates to null, of course, and we should probably consider that! Another option would be to add a bit more conditional smarts to the template language. I'm imaging some kind of bracketing logic like instead of thing=%{customdata[0]} you could say %{?} thing=%{customdata[0]} %{!} (or whatever delimiter logic makes more sense!) that would act as a null-ish handler such that if anything inside these delimiters returned null then we wouldn't display the whole block. That would avoid even seeing thing= when customdata[0] is null.
I'm thinking of how to address situations like #6541 or like the root-level nodes that PX generates for treemaps which look kind of ugly ATM.
It pretty frequently happens that some bit of data or customdata is null and this results in ugly hoverlabels when using texttemplate (we end up seeing the template text instead!). One option would be simply to not render the template directive when it evaluates to null, of course, and we should probably consider that! Another option would be to add a bit more conditional smarts to the template language. I'm imaging some kind of bracketing logic like instead of
thing=%{customdata[0]}you could say%{?} thing=%{customdata[0]} %{!}(or whatever delimiter logic makes more sense!) that would act as a null-ish handler such that if anything inside these delimiters returned null then we wouldn't display the whole block. That would avoid even seeingthing=whencustomdata[0]is null.I'm thinking of how to address situations like #6541 or like the root-level nodes that PX generates for treemaps which look kind of ugly ATM.