Coder Social home page Coder Social logo

openhpi / m.e.i.n.e.l Goto Github PK

View Code? Open in Web Editor NEW
11.0 6.0 1.0 2.25 MB

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/

HTML 0.38% JavaScript 99.62%
visualizations polymer plotlyjs d3

m.e.i.n.e.l's People

Contributors

adrianjost avatar dependabot[bot] avatar felixmerz avatar flowirtz avatar franzliedke avatar janrenz avatar langleu avatar maximilianv avatar mrserth avatar soldag avatar tobiasrohloff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

soldag

m.e.i.n.e.l's Issues

make charts responsive

Todo

  • make bar chart responsive
  • make pie chart responsive
  • width and height as attribute

Update to polymer 2

Now that Polymer 2 is live this should be Updated to avoid issues when running together with Polymer 2 components.

Optimize AJAX dealing

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

look deeper into d3.select()

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.

DomStringMap: Data not transmitted correctly if Array of Numbers

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.

WTF?!

TODO: find more elegant way to solve this. Maybe even file a bug with Polymer.

JSON:API Support

We created the following endpoint and want to create a line chart with data filters. Therefore we need:

  • the ajax-wrapper has to understand json:api
  • a whitelist of attributes that should be displayed as lines (y)
  • the attribute that should be used as timestamps (x) - 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"
  }
}

Technology Stack Decisions: Visualization

Currently, we are deciding between native D3...

D3 (vanilla)

Good

  • plenty (endless) chart types
  • vanilla => expandable

Bad

  • vanilla => complexity ๐Ÿ‘Ž => lots of code for standard charts

... and these four frameworks built on top of D3:

NVD3

Good

  • ~30 chart types

Bad

  • <=IE8 not supported?!

Plotly

Good

  • ~20 chart types
  • quickstart guide

Bad

  • documentation not great (good enough though?)

C3

Good

  • ~16 chart types

Bad

  • last update: spring 2016

Vega lite

Good

  • ~20 chart types

Bad

  • all JSON
  • no interaction?
  • no data updates?
  • components?

Comment further arguments / frameworks below to add to the discussion. ๐Ÿ˜Š

Focus on piechart

Focus on piechart so that integration test can be done with it

Roadmap

  • Create piechart
  • design data endpoint
  • integrate data endpoint (decided to not do data - rather supply data directly!)
  • test piechart
  • deploy piechart to customer
  • integrate piechart
  • document process

Fill /doc

  • add intro / description of project (#24, #21, #32)
  • add "howto use component"
  • auto publish documentation (see #19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.