added pie chart

This commit is contained in:
youri.apell@gmail.com
2022-11-02 16:05:25 +01:00
parent 0bc9bd9c14
commit 4ed7c84140
12 changed files with 45 additions and 4 deletions

3
.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

1
.idea/.name generated Normal file
View File

@@ -0,0 +1 @@
neca.py

View File

@@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

4
.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/twitter-project.iml" filepath="$PROJECT_DIR$/.idea/twitter-project.iml" />
</modules>
</component>
</project>

12
.idea/twitter-project.iml generated Normal file
View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">
<option name="format" value="PLAIN" />
<option name="myDocStringFormat" value="Plain" />
</component>
</module>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

Binary file not shown.

View File

@@ -46,7 +46,7 @@ def generate_tweet(ctx, e):
# emit to outside world
emit('tweet', tweet)
for w in words(tweet['text']):
emit('balk', {
emit('pie', {
'action': 'add',
'value': (str(w), 1)
})

View File

@@ -111,7 +111,7 @@
</div>
<div class="popchart column">
<span class="colheader chartheader">Sports Popularity Filter</span>
<div id="balk" style="height:300px; background-color: white;"></div>
<div id="pie" style="height:300px; background-color: white;"></div>
</div>
</div>
</div>
@@ -126,12 +126,13 @@
<script src="./lib/tweets.js"></script>
<script src="./js/code.js"></script>
<script src="./js/events.js"></script>
<script src="./lib/jquery.flot.pie.js"></script>
<script>
block("#tweet").tweets({
memory: 20
});
block('#balk').barchart();
events.connect('balk', '#balk');
block('#pie').piechart();
events.connect('pie', '#pie');
events.connect("tweet", "#tweet");
// // create a rolling chart block

View File

Binary file not shown.

View File

Binary file not shown.