areski / django-nvd3

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

Line Chart tool tip not working in case of intersection two series #25

Open LeoDevTeam opened 10 years ago

LeoDevTeam commented 10 years ago

Hi,

I am using Django 1.5.4, python 2.7 and django-nvd3 0.6.0, to show statistics for users.

Here is example of data I am passing to chart:

data = { 'charttype': 'lineChart', 'chartdata': { 'x':[1388514600000L, 1388601000000L, 1388687400000L, 1388773800000L], 'y1':[0,0,0,4], 'y2':[1,3,2,4], }, 'chartcontainer': 'chartcontainer', 'extra': { 'x_is_date': True, 'x_axis_format': '%d %b %Y %H', 'tag_script_js': False, 'jquery_on_ready': False, } }

Since y1 series and y2 series intersects at 4, it raises error Type Error: e is undefined. It is rendering the chart as required but it is not showing tool tip at all.

But if you change the value of y2 to [1,3,2,5], it will work as required.

Any pointer or suggestion would be great.

Thanks, Pradnya