Giter Site home page Giter Site logo

dog-breeds's Introduction

About this test

To see this test working, clone the repository, type npm install from the root folder and then type npm start.

Technologies used

For this test I chose to use React for it is not only the JavaScript tool in which I have more knowledge and experience, but also because it is the one used in Strands.

For the chart I used Recharts because it is build with and for React, and D3 which was my first option, but I found Recharts was much more simple and good enough for a small pie chart like the one in this test.

I also used randomcolors. An npm package to give random colors to the elements in the chart.

Success

All the functionalities that were added to the app are working as expected. I also decided to make the label in the pie chart only appear on hover because it was not very readable when they all showed at the same time. I also added a list of all the breeds with the percentage in the side for reference.

Challenges

I had never used a library for data visualization so I had to look through the documentation and understand how it worked. Many things are taken from the documentation and examples.

What to improve

For an app with one single view, I don't think that Redux is necessary, but if I had more time, I would have liked to implement it.

I would have also liked to add the second chart with the top 10 breeds. For that I would have sorted the array I created with the data by picture percentage, take the first 10 and sort it again alphabetically.

For this second chart, I would have probably left the labels visible all the time.

I would have added some tests, but since I haven't done that since I first learned it, I would have had to do some research to remember how to do it and would need more time.

And I would have liked to connect the breeds list and the chart so when you click a breed in the list, the label in the Pie Chart appears. For this I would try to set the state with the active index, the same way it is done for the pie chart.

Additional notes

All working code is in the branch Master, but I will create some new branches because I want to implement Redux and the other things I mentioned. I will not merge this new branches with master.

dog-breeds's People

Contributors

inkala avatar

Stargazers

Gustavo Bueno avatar

Watchers

James Cloos avatar  avatar

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.