Closed zebulon2 closed 10 years ago
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.
Just added bug fix 7720d91.
:+1:
This is cool as it also allows custom valueFormat definitions like:
'chart_attr': { 'valueFormat': 'd3.format(",.8f")', }
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.