Coder Social home page Coder Social logo

Comments (8)

wa0x6e avatar wa0x6e commented on June 8, 2024 1

Found the issues after some tests, you have to use in your data object

y: d => +d['energylevel'],

Seems like data imported from CSV are string and not number, will investigate

from cal-heatmap.

wa0x6e avatar wa0x6e commented on June 8, 2024 1

The extra casting to int or float is indeed needed when importing from other source than JS array. Will update the docs to reflect that

from cal-heatmap.

wa0x6e avatar wa0x6e commented on June 8, 2024

from cal-heatmap.

devprabal avatar devprabal commented on June 8, 2024

If i download the loaded file from the Network tab, it downloads well. I am not sure about the "file loading correctly" part. How do i check that?

from cal-heatmap.

wa0x6e avatar wa0x6e commented on June 8, 2024

from cal-heatmap.

devprabal avatar devprabal commented on June 8, 2024

I see only the error for favicon file in the developer tools console tab. Nothing else.

Also, now i tried out launching a server using python under WSL (http://172.29.198.29:8000/). But the result is the same (no colors).

devp@IdeaPad:/mnt/d/24k_tracks$ python3 -m "http.server"
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
172.29.192.1 - - [20/Jan/2024 14:38:34] "GET / HTTP/1.1" 200 -
172.29.192.1 - - [20/Jan/2024 14:38:35] "GET /records/gym_track.csv HTTP/1.1" 200 -
172.29.192.1 - - [20/Jan/2024 14:38:35] code 404, message File not found
172.29.192.1 - - [20/Jan/2024 14:38:35] "GET /favicon.ico HTTP/1.1" 404 -

Here also, the csv file request gets completed.

from cal-heatmap.

devprabal avatar devprabal commented on June 8, 2024

I also tried to launch a CORS server through python. I don't think CORS is blocked.

image

#!/usr/bin/env python3
from http.server import HTTPServer, SimpleHTTPRequestHandler, test
import sys

class CORSRequestHandler (SimpleHTTPRequestHandler):
    def end_headers (self):
        self.send_header('Access-Control-Allow-Origin', '*')
        SimpleHTTPRequestHandler.end_headers(self)

if __name__ == '__main__':
    test(CORSRequestHandler, HTTPServer, port=int(sys.argv[1]) if len(sys.argv) > 1 else 8000)

from cal-heatmap.

devprabal avatar devprabal commented on June 8, 2024

It works well now! Thank you so much for such a quick response. I hope I can track my habits this year well :)

You may close the issue.

from cal-heatmap.

Related Issues (20)

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.