Coder Social home page Coder Social logo

recharts-scale's Introduction

recharts-scale

Build Status

Scale of Cartesian Coordinates

recharts-scale's People

Contributors

arcthur avatar avindra avatar jasonhzq avatar jmfrancois avatar ofk avatar rafaelsalguero avatar xile611 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

recharts-scale's Issues

Some thoughts about optimize calc nice scales

Link recharts/recharts#4020

Thoughts

  • Maybe it's better to splice range equally into min and max.
  • Like [-2000, 3001] cut to 4 pieces. The initial pieces is min 1 and max 2 with 2000 steps, So it's better to set min and max equal and find no remaining count then return.
  • More commonly if the min has X and max has Y pieces, but we remain k pieces. We should first try to set X and Y equally, then we separate remaining tictcount into the two parts seems better.

Auto calculate step of integer

now scale(1, 5, 6) return [ 0.85, 1.7, 2.55, 3.4, 4.25, 5.1 ]

expect result [0, 1, 2, 3, 4, 5 ] or [1, 2, 3, 4, 5, 6 ]

niceTicks of Infinity domains are wrong

5 ticks between (-Infinity, Infinity) are not [Infinity, Infinity, Infinity, Infinity, -Infinity]

  "domain": [
    Infinity,
    -Infinity
  ]

  "niceTicks": [
    Infinity,
    Infinity,
    Infinity,
    Infinity,
    -Infinity
  ]

this change is breaking that feature: recharts/recharts#1509

Full axis object:

{
  "allowDataOverflow": false,
  "allowDecimals": true,
  "allowDuplicatedCategory": true,
  "axisLine": false,
  "axisType": "yAxis",
  "bandSize": 0,
  "categoricalDomain": undefined,
  "domain": [
    Infinity,
    -Infinity
  ],
  "duplicateDomain": undefined,
  "height": 356,
  "hide": false,
  "isCategorial": false,
  "label": false,
  "layout": "horizontal",
  "mirror": false,
  "niceTicks": [
    Infinity,
    Infinity,
    Infinity,
    Infinity,
    -Infinity
  ],
  "orientation": "left",
  "originalDomain": [
    "auto",
    "auto"
  ],
  "padding": {
    "top": 0,
    "bottom": 0
  },
  "realScaleType": "linear",
  "reversed": false,
  "scale": " ƒ scale(x)",
  "tick": "",
  "tickCount": 5,
  "tickFormatter": "ƒ (v)",
  "tickLine": false,
  "type": "number",
  "width": 31.796875,
  "x": 0,
  "y": 30,
  "yAxisId": "1"
}

Publish new version

Hi,

Currently, recharts-scale and thus recharts itself is not compatible with snowpack or any other esm based tooling / bundlers as the latest version on npm doesn't have a module build. I can see, that this was already submitted as a pull request and merged ~4 months ago. Would you mind tagging a new version (0.4.4) with this included?

Thanks!

Installation error

hi rechart-scale team,

B52F482B-584F-434F-9DA4-708100458D1F

Something went wrong during my build process. the error occured during yarn install. from I can see, the path to a file is incorrect from node_modules.

Currently using recharts v^2.0.8

I'm not sure if it's due to the recent package update, but this failure just happened last night.

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.