Corona-tracker icon indicating copy to clipboard operation
Corona-tracker copied to clipboard

INNOVATION TEST: Place a sample chart into education card by reusing Chart.js

Open tesla809 opened this issue 4 years ago • 12 comments

Summary

Place a sample chart.js into education card in the sliding cards feature. Please reuse the chart.js component we already have to do so.

The idea is that pictures, graphs/charts can convey information much quicker and denser than just text. It is a bit more engaging as well.

KEY: This is more of a test. Don't spend too much time on it. It's more to see how it would look and if its something worth pursuing further.

To save even more time, ask @Tanvez on how to quickly implement when the time comes.

Motivation

Why are we doing this? Testing forms of displaying information. Testing forms of increasing engagement

What use cases does it support? Increase engagement aids in education.

What is the expected outcome? One of the education cards will have a simple graph or chart that displays some useful information.

Describe alternatives you've considered

Not adding this and just having simple text. A short sentence to summarize a news fact/article.

Additional context

The experiment to add this should be relatively quick. No need to lots of styling. More to see how it will look.

Please include a gif of interacting with the feature in the PR as well.

tesla809 avatar Mar 27 '20 13:03 tesla809

@pavel-ilin are you working on this?

SomeMoosery avatar Mar 27 '20 15:03 SomeMoosery

This can definitely be done at a later time after v2 release since we are on a time crunch.

tesla809 avatar Mar 27 '20 15:03 tesla809

Working on it now.

pavel-ilin avatar Mar 27 '20 16:03 pavel-ilin

I did not push it yet because it's just a test. Here how Chart component looks inside the Card component

test

pavel-ilin avatar Mar 27 '20 17:03 pavel-ilin

looks promising!!!

tesla809 avatar Mar 27 '20 18:03 tesla809

Wow, this is awesome! We should definitely figure out a way to incorporate this soon - makes the app feel a lot more "alive"

SomeMoosery avatar Mar 27 '20 18:03 SomeMoosery

Yes, it makes app more interactive and alive. We can reuse Chart.js component and feed it different data for each card.

pavel-ilin avatar Mar 28 '20 17:03 pavel-ilin

Should we close this issue?

pavel-ilin avatar Mar 29 '20 16:03 pavel-ilin

I think we can leave it open for the time being, until it’s been fully implemented. I’m open to ideas though - thoughts?

SomeMoosery avatar Mar 29 '20 16:03 SomeMoosery

@pavel-ilin Is Chart.js working dependent on installing canvas? I see canvas is used in it, but my googling tells me it's built in and doesn't need installing? Installing it is also giving me errors Dockerizing the app so I want to make sure it's necessary.

JWaltuch avatar Apr 01 '20 16:04 JWaltuch

@JWaltuch Chart.js It shouldn't depend in separate canvas package. Canvas is not imported from external libraries into Chart.js. It use default canvas JSX element.

pavel-ilin avatar Apr 01 '20 16:04 pavel-ilin

Cool :) I wonder if if it was added to package.json for Chart.js to begin with or if its for something else? That's the only place I see canvas being used

JWaltuch avatar Apr 01 '20 17:04 JWaltuch