diff --git a/holoviews/element/chart.py b/holoviews/element/chart.py index e0fd71c53e..6cdec32dc6 100644 --- a/holoviews/element/chart.py +++ b/holoviews/element/chart.py @@ -45,10 +45,13 @@ def __init__(self, data, **params): def _validate_data(self, data): - if data.ndim > 1 and not data.shape[1] == len(self.dimensions()): + if data.ndim == 1: + data = np.array(zip(range(len(data)), data)) + if not data.shape[1] == len(self.dimensions()): raise ValueError("Data has to match number of key and value dimensions") return data + def _process_map(self, ndmap): """ Base class to process an NdMapping to be collapsed into a Chart.