Skip to content

add cleaner hoverlabels with texttemplates #6542

Description

@nicolaskruchten

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogfeaturesomething new

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions