django-nvd3
django-nvd3 copied to clipboard
Tooltips do not work
I am trying to define the tooltips for a chart like this:
...
extra = {"tooltip": {"y_start": "foo", "y_end": "bar"}}
chartdata = {
'x': xdata,
'name': 'series 1', 'y': ydata, 'extra': extra,
}
context['chart'] = {
'type': "lineChart",
'container': 'chart_container',
'data': chartdata,
'extra': {
'x_is_date': True,
'x_axis_format': "%Y-%m-%d",
'tag_script_js': True,
'jquery_on_ready': False,
}
}
Based on the documentation, I expect the above to result in a tooltip like "foo $y-value bar" (ie, if the y-value was 10, "foo 10 bar"). This does not work. Instead the tooltip stays at the default value of "$y-value at $x-value".
How can I define a format for the tooltip?
I am also facing a similar issue
@akrf, @salilpa: What version of nvd3 is being used?
I ran into the same problem with nvd3 version 1.8.1. Going back to 1.7.1 resolves the problem for now.