 
 class Sparkline
+
+
+
   constructor: (selector, options) ->
     opts = hx.merge.defined({
       strokeColor: hx.theme.plot.colors[0],
       data: [],
       type: 'line',
-      labelRenderer: hx.plot.label.basic
+      labelRenderer: (element, obj) -> hx.select(element).text(obj.y + ' (' + obj.x + ')')
     }, options)
+
+    innerLabelRenderer = (element, meta) ->
+      marker = hx.detached('div').class('hx-plot-label-marker').style('background', meta.color)
+
+      xValue = meta.values[0]
+      yValue = meta.values[1]
+      midX = (meta.bounding.x1 + meta.bounding.x2) / 2
+      midY = (meta.bounding.y1 + meta.bounding.y2) / 2
+
+      labelNode = hx.detached('div').node()
+
+      opts.labelRenderer(labelNode, {
+        x: xValue.value,
+        y: yValue.value
+      })
+
+      details = hx.detached('div').class('hx-plot-label-details-basic')
+        .classed('hx-plot-label-details-left', meta.x >= midX)
+        .classed('hx-plot-label-details-bottom', meta.y >= midY)
+        .add(hx.detached('span').class('hx-plot-label-sparkline-x').add(labelNode))
+
+      hx.select(element)
+        .clear()
+        .add(marker)
+        .add(details)
 
     hx.components.clear(selector)
     hx.component.register(selector, this)


  render: ->
    self = this
    @_.series.data(@data().map((d, i) -> {x: i, y: d}))
    @_.series.fillColor(@fillColor())
    @_.series.labelRenderer(@labelRenderer())
    if @_.options.type is 'line'
      @_.series.strokeColor(@strokeColor())
    @_.graph.render()

    })
    series =  axis.addSeries(opts.type, {
      fillEnabled: true
      labelRenderer: innerLabelRenderer
    })

    @_ = {
