Code Monkey home page Code Monkey logo

klimatneutral's People

Contributors

zapico avatar

Watchers

 avatar  avatar

klimatneutral's Issues

Are the two donut charts at the top-right based on the same data?

Do the two donut charts at the top right monitor the same dataset? They are the same at the beginning, but only one of them is updated when the sliders are changed. I'm assuming that they should both be updated, but in that case, why do we have two identical ones?

Rule for updating icicle chart from the "elbilar" slider value

I didn't get exactly the rule to update the icicle chart from the "elbilar" slider. Right now it's written as

dataKlimatutslapp.children[0].children[0] = dataKlimatutslapp.children[0].children[0] / antalElBilar

but dataKlimatutslapp.children[0].children[0] is an object, so I'm assuming you mean its "value" property. Even then, I didn't get the meaning of the division by the number from the slider..?

Donut charts can have a super class

There are right now three functions for making donut charts, which share a lot of code. They could have a super class to minimize duplication (or a common prototype if we don't want to have object-orientation).

Then, in order to deal with the specific behavior/looks of each, we might either use some extra parameters, or pass in an object that looks like config but only contains the actual differences from the base one (instead of being fully defined).

Code refactorings

There are many code refactorings that we can do like:

  • Making classes for each view / dataset,
  • Separating them in different files,
  • Exporting modules,
    but I think we can do that slowly after things are working.

Data encapsulation

Right now I'm just considering that all data is in the global scope, so it's accessible by everyone. It might be interesting, for example, to make the data itself hidden away and only be accessible through some specific methods that change it, in order to maintain the integrity.

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.