/**
 * Copyright (C) 2012 - present by OpenGamma Inc. and the OpenGamma group of companies
 *
 * Please see distribution for license.
 */
package com.opengamma.web.server.push.analytics.formatting;

import com.opengamma.core.historicaltimeseries.HistoricalTimeSeries;
import com.opengamma.engine.value.ValueSpecification;

/**
 *
 */
/* package */ class HistoricalTimeSeriesFormatter extends AbstractFormatter<HistoricalTimeSeries> {

  private final LocalDateDoubleTimeSeriesFormatter _delegate = new LocalDateDoubleTimeSeriesFormatter();

  /* package */ HistoricalTimeSeriesFormatter() {
    super(HistoricalTimeSeries.class);
  }

  @Override
  public Object formatCell(HistoricalTimeSeries value, ValueSpecification valueSpec) {
    return _delegate.formatCell(value.getTimeSeries(), valueSpec);
  }

  @Override
  public Object format(HistoricalTimeSeries value, ValueSpecification valueSpec, Format format) {
    return super.format(value, valueSpec, format);
  }

  @Override
  public DataType getDataType() {
    return DataType.TIME_SERIES;
  }
}

@@ -920,21 +920,25 @@
  return 
-super
+_delegate
 .format(
@@ -942,16 +942,32 @@
 at(value
+.getTimeSeries()
 , valueS

Tweak to time series formatting