areski / django-nvd3

Django wrapper for nvd3 - It's time for beautiful charts
Other
416 stars 124 forks source link

Tooltips do not work #49

Open akrf opened 9 years ago

akrf commented 9 years ago

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?

salilpa commented 9 years ago

I am also facing a similar issue

portante commented 8 years ago

@akrf, @salilpa: What version of nvd3 is being used?

evansnj commented 8 years ago

I ran into the same problem with nvd3 version 1.8.1. Going back to 1.7.1 resolves the problem for now.