openhpi / m.e.i.n.e.l Goto Github PK
View Code? Open in Web Editor NEWModern, Extensible and Interactive Number Exploration Library (or short: m.e.i.n.e.l)
Home Page: https://openhpi.github.io/m.e.i.n.e.l/
Modern, Extensible and Interactive Number Exploration Library (or short: m.e.i.n.e.l)
Home Page: https://openhpi.github.io/m.e.i.n.e.l/
Our other components are using array as type. Polymer then handles all the json stuff automatically
Todo
Now that Polymer 2 is live this should be Updated to avoid issues when running together with Polymer 2 components.
Should be the same as with github, labels should come from outside so we can translate them
Currently there is a lot of code duplication: We should figure out a way to minimize that and only supply the url of the data endpoint to a component and the rest is done via another ajax component or some
References #8
Since Chrome will deprecate HTML Imports, we need to upgrade to Polymer 3.
ideas:
There might be a problem, as d3 seems to search the complete site for the wanted div/id and not the local/shadow dom of the polymer element.
This will cause problems when using multiple components on the same site, using the same div identifiers.
if data is supplied as array of numbers (see dataset in i.e. activityChart and pieChart), one must insert the following code into the component at the top:
<div style="display:none;">{{dataset}}</div>
If not, only a DomStringMap
whill be returned on this.dataset
.
This only applies to Arrays of Numbers, Arrays of Strings are not included.
TODO: find more elegant way to solve this. Maybe even file a bug with Polymer.
We created the following endpoint and want to create a line chart with data filters. Therefore we need:
updated_at
in our example below{
"data": [
{
"type": "course-statistics",
"id": "4c3c9808-1433-4160-aaa1-89b8f34bf2d1",
"links": {
"self": "/api/v2/course-statistics/4c3c9808-1433-4160-aaa1-89b8f34bf2d1"
},
"attributes": {
"course_name": "Cloud und Virtualisierung",
"course_code": "cloud2013",
"course_id": "00000001-3300-4444-9999-000000000001",
"total_enrollments": 198,
"current_enrollments": 198,
"course_status": "archive",
"no_shows": 197,
"enrollments_last_day": 0,
"enrollments_at_course_start": 0,
"enrollments_at_course_middle_netto": 0,
"enrollments_at_course_middle": 0,
"enrollments_at_course_end": null,
"total_questions": 4,
"questions_last_day": 0,
"total_answers": 3,
"answers_last_day": 0,
"total_comments_on_answers": 2,
"comments_on_answers_last_day": 0,
"total_comments_on_questions": 103,
"comments_on_questions_last_day": 0,
"certificates": 0,
"helpdesk_tickets": 0,
"helpdesk_tickets_last_day": 0,
"start_date": "2015-04-07T00:00:00.000Z",
"end_date": "2017-06-06T00:00:00.000Z",
"new_users": 200,
"completion_rate": 0,
"consumption_rate": 0,
"enrollments_per_day": [],
"hidden": false,
"updated_at": "2016-11-11T08:17:52.068Z",
"created_at": "2016-11-11T08:17:51.868Z"
},
"relationships": {
"course": {
"data": {
"type": "courses",
"id": "00000001-3300-4444-9999-000000000001"
},
"links": {
"related": "/api/v2/courses/00000001-3300-4444-9999-000000000001"
}
}
}
},
{
"type": "course-statistics",
"id": "4c3c9808-1433-4160-aaa1-89b8f34bf2d1",
"links": {
"self": "/api/v2/course-statistics/4c3c9808-1433-4160-aaa1-89b8f34bf2d1"
},
"attributes": {
"course_name": "Cloud und Virtualisierung",
"course_code": "cloud2013",
"course_id": "00000001-3300-4444-9999-000000000001",
"total_enrollments": 199,
"current_enrollments": 199,
"course_status": "archive",
"no_shows": 198,
"enrollments_last_day": 0,
"enrollments_at_course_start": 0,
"enrollments_at_course_middle_netto": 0,
"enrollments_at_course_middle": 0,
"enrollments_at_course_end": 0,
"total_questions": 4,
"questions_last_day": 0,
"total_answers": 3,
"answers_last_day": 0,
"total_comments_on_answers": 2,
"comments_on_answers_last_day": 0,
"total_comments_on_questions": 103,
"comments_on_questions_last_day": 0,
"certificates": 0,
"helpdesk_tickets": 0,
"helpdesk_tickets_last_day": 0,
"start_date": null,
"end_date": "2017-01-24T00:00:00.000Z",
"new_users": 200,
"completion_rate": 0,
"consumption_rate": 0,
"enrollments_per_day": [],
"hidden": false,
"updated_at": "2017-03-07T13:21:15.885Z",
"created_at": "2016-11-11T08:17:51.868Z"
},
"relationships": {
"course": {
"data": {
"type": "courses",
"id": "00000001-3300-4444-9999-000000000001"
},
"links": {
"related": "/api/v2/courses/00000001-3300-4444-9999-000000000001"
}
}
}
}
],
"meta": {
"current_page": 1,
"total_pages": 1
},
"links": {
"first": "http://0.0.0.0:3000/api/v2/course-statistics?filter%5Bcourse_id%5D=00000001-3300-4444-9999-000000000001&filter%5Bhistoric_data%5D=true&page%5Bnumber%5D=1",
"last": "http://0.0.0.0:3000/api/v2/course-statistics?filter%5Bcourse_id%5D=00000001-3300-4444-9999-000000000001&filter%5Bhistoric_data%5D=true&page%5Bnumber%5D=1"
}
}
Contact F. Liedke for that (in accordance with @jprberlin )
how can we update components?
probably using milestones
We decided to use Polymer. See the latest comment for a more exhaustive explanation.
The width of the demo page got fixed by adding
div.vertical-section-container {
max-width: 1500px;
}
to the CSS. This doesn't work on Mac w/ Firefox though (discovered by @jak-ing ).
Look into this and find an appropriate lasting fix.
Currently, we are deciding between native D3...
... and these four frameworks built on top of D3:
Comment further arguments / frameworks below to add to the discussion. ๐
Focus on piechart so that integration test can be done with it
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.