Skip to content

Instantly share code, notes, and snippets.

@hirokiky
Last active December 17, 2015 06:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hirokiky/5567640 to your computer and use it in GitHub Desktop.
Save hirokiky/5567640 to your computer and use it in GitHub Desktop.
config.add_chart_type('linechart', 'tochart.charts.Linechart')
config.add_chart_backend('highcharts', 'tochart.backends.Highcharts')
@tochart_config('daily.linechart.highcharts',
chart_type='linechart',
chart_backend='highcharts')
def daily(request, data)
x = 1
y = 2
return [(x, y), (x, y)]
chart = tochart(request, data, 'daily.linechart.highcharts')
chart.render() # => returns a part of html for rendering the chart.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment