• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-COVID-19 (Deprecated)

Scheduled Pinned Locked Moved Health
71 Posts 16 Posters 22.9k Views 16 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    A Former User @lavolp3
    last edited by Mar 2, 2020, 9:54 AM

    @lavolp3
    In API, timeseries data could be derived also. So I think possible. Maybe I can add a line-graph for last 10 days with canvas too. But frankly says, I wish someone make it for me. Always I’m making modules by myself because nobody makes it for me before. Myself is very lazy. :)
    Today, I have a prior work to finish, so in 2~3 days I’ll add that feature new confirmed and new recovered.

    L 1 Reply Last reply Mar 2, 2020, 11:43 AM Reply Quote 0
    • L Offline
      lavolp3 Module Developer @Guest
      last edited by lavolp3 Mar 2, 2020, 12:16 PM Mar 2, 2020, 11:43 AM

      @Sean Can you give me a source for the time_series data?
      Then I’ll try to add a graph via chart.js and send a PR

      How to troubleshoot modules
      MMM-soccer v2, MMM-AVStock

      ? 1 Reply Last reply Mar 2, 2020, 3:09 PM Reply Quote 0
      • ? Offline
        A Former User @lavolp3
        last edited by Mar 2, 2020, 3:09 PM

        @lavolp3
        You can use https://github.com/Laeyoung/COVID-19-API
        Or you can find several apis by googling

        L 1 Reply Last reply Mar 3, 2020, 8:21 AM Reply Quote 0
        • L Offline
          lavolp3 Module Developer @Guest
          last edited by Mar 3, 2020, 8:21 AM

          @Sean I’ve tried to call the timeseries link with the implemented XMLHTTPrequest but only get an incomplete answer (readyState 3, Status 200)
          Any suggestions?

          How to troubleshoot modules
          MMM-soccer v2, MMM-AVStock

          ? 1 Reply Last reply Mar 3, 2020, 9:36 AM Reply Quote 0
          • ? Offline
            A Former User @lavolp3
            last edited by Mar 3, 2020, 9:36 AM

            @lavolp3
            I’ll try and implement your requested feature in 1~2 days. Thanks for interesting. :)

            L 1 Reply Last reply Mar 3, 2020, 12:44 PM Reply Quote 0
            • L Offline
              lavolp3 Module Developer @Guest
              last edited by Mar 3, 2020, 12:44 PM

              @Sean working on it and not too far from finished in this branch
              https://github.com/lavolp3/MMM-COVID-19/tree/timeseries

              Source data is called and parsed to an array which can be used by the chart. This part is done
              The chart however is not yet shown in the dom. Chart.js is always tricky for me since the dom object needs to be created first and then filled with the chart.
              Also the many dom updates due the revolving regions does not help for me.

              But I guess it’s a start.

              How to troubleshoot modules
              MMM-soccer v2, MMM-AVStock

              ? S 2 Replies Last reply Mar 3, 2020, 2:32 PM Reply Quote 0
              • ? Offline
                A Former User @lavolp3
                last edited by Mar 3, 2020, 2:32 PM

                @lavolp3
                I’m removing a dependency of API, Instead, data will be accessed from Original JohnsHopkins GitHub directly. So, can you wait a while till refactoring is finished? (1~2 days will be taken)

                1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @lavolp3
                  last edited by Mar 3, 2020, 4:26 PM

                  @lavolp3 said in MMM-COVID-19:

                  Chart.js is always tricky for me since the dom object needs to be created first and then filled with the chart.

                  It shouldn’t be that hard.
                  If the div doesn’t exist, create it
                  If u have data /new data to display, create the chart into that div, else leave it empty.

                  Update chart didn’t work for me very well. So I delete the prior when building the new chart.

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  L 1 Reply Last reply Mar 3, 2020, 8:05 PM Reply Quote 0
                  • L Offline
                    lavolp3 Module Developer @sdetweil
                    last edited by Mar 3, 2020, 8:05 PM

                    @sdetweil you’re right. It gets more difficult if I do it in a rep I haven’t created. Need to find out the workflow first and sometimes crate workarounds. Every MM module developer has their own ways of creating update/call cycles.
                    However since I’m really new to JS this is all still quite challenging.

                    How to troubleshoot modules
                    MMM-soccer v2, MMM-AVStock

                    S 1 Reply Last reply Mar 3, 2020, 8:14 PM Reply Quote 0
                    • S Offline
                      sdetweil @lavolp3
                      last edited by Mar 3, 2020, 8:14 PM

                      @lavolp3 i don’t think JS is the problem, its a pretty simple language…

                      I think the MM runtime, and module structure is a challenge…

                      u can look at my repo using chartjs here…

                      https://github.com/sdetweil/WaterLevels

                      i had two sets of data from my server and wanted two charts…
                      so they are an array of chart info…

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 6
                      • 7
                      • 8
                      • 1 / 8
                      1 / 8
                      • First post
                        8/71
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy