Skip to content

Instantly share code, notes, and snippets.

@adamrneary
Last active December 20, 2015 20:09
Show Gist options
  • Save adamrneary/6188809 to your computer and use it in GitHub Desktop.
Save adamrneary/6188809 to your computer and use it in GitHub Desktop.
module.exports = class BaseChartView extends View
className: 'chart-container'
initialize: (@options) ->
# ...
@chart = new Tactile.Chart @options
@chart.addSeries(series) if series
@chart.element(@el)
.onManipulate =>
[d1, d2] = @chart.x.domain()
app.state.set 'timeframe', app.periods.frameByDate(d1, d2)
mediator.on 'route:rendered', @renderChart
mediator.on 'route:change', @removeChart
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment