diff --git a/__pycache__/dashboard.cpython-310.pyc b/__pycache__/dashboard.cpython-310.pyc index f8955d3..85375b1 100644 Binary files a/__pycache__/dashboard.cpython-310.pyc and b/__pycache__/dashboard.cpython-310.pyc differ diff --git a/dashboard.py b/dashboard.py index 1478963..e832057 100644 --- a/dashboard.py +++ b/dashboard.py @@ -13,7 +13,7 @@ root_content_path = 'dashboard_static' # the action will be called with the context and the event @event('init') def setup(ctx, e): - start_offline_tweets('sports1.txt', event_name="tweet", time_factor=0.01) + start_offline_tweets('sports1.txt', event_name="tweet", time_factor=0.1) ctx.count = 0 # fire('sample', {'previous': 0.0}) diff --git a/dashboard_static/index.html b/dashboard_static/index.html index 9e26092..c87c293 100644 --- a/dashboard_static/index.html +++ b/dashboard_static/index.html @@ -116,7 +116,7 @@
- Sports Popularity Filter + Sports Popularity Pie Chart
diff --git a/dashboard_static/js/code.js b/dashboard_static/js/code.js index bf2dca8..f2b9694 100644 --- a/dashboard_static/js/code.js +++ b/dashboard_static/js/code.js @@ -58,6 +58,12 @@ function tweetCell(tweet) { } function filterTweets(tweets, bannedWords=[], searchWords=[], sorted, order) { + if(bannedWords.length == 1 && bannedWords[0] == ""){ + bannedWords = [] + } + if(searchWords.length == 1 && searchWords[0] == ""){ + searchWords = [] + } if(bannedWords.length > 0){ tweets = filterBannedWords(bannedWords, tweets) }