areski/django-nvd3 — pull request #20 by zebulon2 (2013-12-12 11:26:36+00:00)
Title: Custom chart attributes support

This is related to (and requires) https://github.com/areski/python-nvd3/pull/24 in python-nvd3.

User can now pass custom chart attributes in extra.

Example:
xdata = [0.001, 0.01, 0.1, 1, 10, 100]
data = { 'charttype': charttype,
'chartdata': chartdata,
'chartcontainer': chartcontainer,
'extra': {
'x_is_date': False,
'x_axis_format': '',
'tag_script_js': True,
'jquery_on_ready': False,
'chart_attr': { 'xScale':'(d3.scale.log())',
'xAxis.tickValues':xdata },
}
}

This allows user to display charts with a log scale on X axis, with the specified tick values.