docs: def _scatter_or_line(h1: Histogram1D, mark_template: list, kwargs: dict) -> dict:
      """Create shared properties for scatter / line plot."""
      from physt.histogram_collection import HistogramCollection
      if isinstance(h1, HistogramCollection):
          collection = h1
          h1 = h1[0]
      else:
          collection = HistogramCollection(h1)
  
      vega = _create_figure(kwargs)
  
      legend = kwargs.pop("legend", len(collection) > 1)
  
      vega["data"] = [
          {
              "name": "table",
              "values": []
          },
          {
              "name": "labels",
              "values": [h.name for h in collection]
          }]
  
      for hist_i, histogram in enumerate(collection):
          centers = histogram.bin_centers.tolist()
          data = get_data(histogram, kwargs.pop("density", None), kwargs.pop("cumulative", None)).tolist()
          vega["data"][0]["values"] += [{"x": centers[i], "y": data[i], "c": hist_i} for i in range(histogram.bin_count)]
  
      _add_title(collection, vega, kwargs)
      _create_scales(collection, vega, kwargs)
      _create_axes(collection, vega, kwargs)
      _create_series_scales(vega)
      _create_series_faceted_marks(vega, mark_template)
      _create_tooltips(h1, vega, kwargs)  # TODO: Make it work!
      if legend:
          _create_series_legend(vega)
  
      return vega