holoviz / panel

Panel: The powerful data exploration & web app framework for Python
https://panel.holoviz.org
BSD 3-Clause "New" or "Revised" License
4.58k stars 499 forks source link

holomap not working if labels (not values) are not unique #1557

Open akhmerov opened 4 years ago

akhmerov commented 4 years ago

As far as I understand, this snippet stopped working in v1.13:

import holoviews
import numpy as np

holoviews.notebook_extension()

holoviews.Dimension.type_formatters[np.float64] = lambda x: str(np.round(x, 2))

holoviews.HoloMap({x: holoviews.VLine(0) for x in np.linspace(0, 0.15, 50)})

The traceback ends with panel complaining about the value not being allowed.

I believe before the identification of what to show was based on the key of the holomap, now it is based on the formatted key of the holomap. Because of the formatter we're using multiple keys have the same string representation.

philippjfr commented 3 years ago

This is definitely a major regression. I'll move it into Panel and see if I can find a fix there.