django-nvd3 icon indicating copy to clipboard operation
django-nvd3 copied to clipboard

Tooltips do not work

Open akrf opened this issue 10 years ago • 3 comments

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?

akrf avatar Feb 27 '15 00:02 akrf

I am also facing a similar issue

salilpa avatar Jul 02 '15 10:07 salilpa

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

portante avatar Jul 06 '15 16:07 portante

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

evansnj avatar Jul 21 '15 16:07 evansnj