mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2025-08-10 07:17:41 +02:00
Issue #123: Charts don't show when there's a large volume of data due to
Google constraints.
This commit is contained in:
4
lib.py
4
lib.py
@ -145,7 +145,7 @@ def line_chart(data):
|
||||
|
||||
|
||||
# Set width to '65px * number of months + 100 for headings.'.
|
||||
chart_url = 'http://chart.apis.google.com/chart?cht=lc&chs=%sx150&chd=t:' % (len(column_headings)*65+100)
|
||||
chart_url = 'http://chart.apis.google.com/chart?cht=lc&chs=%sx150&chd=t:' % (min(len(column_headings)*65+100, 1000))
|
||||
first_row = True
|
||||
row_headings = []
|
||||
for row in data[1:]:
|
||||
@ -190,7 +190,7 @@ def bar_chart(data):
|
||||
|
||||
|
||||
# Set width to '220px * number of months'.
|
||||
chart_url = 'http://chart.apis.google.com/chart?cht=bvg&chs=%sx150&chd=t:' % (len(column_headings) * 220)
|
||||
chart_url = 'http://chart.apis.google.com/chart?cht=bvg&chs=%sx150&chd=t:' % (min(len(column_headings) * 220, 1000))
|
||||
first_row = True
|
||||
row_headings = []
|
||||
for row in data[1:]:
|
||||
|
Reference in New Issue
Block a user