You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There can be good reasons to include nil values (null, Number("NaN"), etc) in your data, but if these are displayed via hovertemplate we act like that field of the template was invalid:
This is confusing to the end viewer, and ugly. Instead, if the data array we pulled the value from explicitly had such an entry we should stringify it (the above would be "null" and "NaN" respectively) and display that. We should only display the un-templated value if you ask for an unrecognized item (%{typo}), or an index that the array doesn't have (%{customdata[2]} when the array only has 2 items for each point))
I'll be glad to make a PR for this.
The text was updated successfully, but these errors were encountered:
There can be good reasons to include nil values (
null
,Number("NaN")
, etc) in your data, but if these are displayed viahovertemplate
we act like that field of the template was invalid:https://codepen.io/alexcjohnson/pen/ogvBpNB?editors=0010
This is confusing to the end viewer, and ugly. Instead, if the data array we pulled the value from explicitly had such an entry we should stringify it (the above would be
"null"
and"NaN"
respectively) and display that. We should only display the un-templated value if you ask for an unrecognized item (%{typo}
), or an index that the array doesn't have (%{customdata[2]}
when the array only has 2 items for each point))I'll be glad to make a PR for this.
The text was updated successfully, but these errors were encountered: