Code Monkey home page Code Monkey logo

chart_sparkline's Introduction

  • 👋 Hi, I’m adnan
  • 🌱 I am a full stack software engineer currently pursuing a Master’s degree in Computer Engineering
  • 📫 You can reach me on my email address [email protected] and my linkedin profile

chart_sparkline's People

Contributors

abhith avatar adnanjpg avatar biner88 avatar claude avatar michalsrutek avatar salehahmedz avatar stefanoamorelli avatar sumsg avatar trentpiercy avatar xqwzts avatar

Watchers

 avatar

chart_sparkline's Issues

gridLineLabelPrecision shows illogical texts

in case of having the following data:

data: [-1.5, 1 - 0, 2 - 5, -1.5, 100, 5, -2.3]

with gridLineLabelPrecision: 3:
Screenshot 2023-12-30 at 4 04 49 PM

with gridLineLabelPrecision: 2:
Screenshot 2023-12-30 at 4 04 32 PM

after digging through the codebase, I discovered that this is not this package's fault, but it's a usage of the wrong function.

this package uses toStringAsPrecision on the values, which evaluates the following values like:

→   100.0.toStringAsPrecision(3)
    "100"
→   100.0.toStringAsPrecision(2)
    "1.0e+2"

I suggest adding a gridLineLabelFixed parameter, which would apply toStringAsFixed on the supplied data

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.