question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature: logarithmic (or pluggable) scale for YAxis and XAxis

See original GitHub issue

There are obviously many applications where a logarithmic is preferable to a linear scale. It would be really cool to be able to pass a scale function to the YAxis and XAxis components, which could optionally accept a number to use as a “base” in a logarithmic function (defaulting to a base of 1 for linear):

// linear
<YAxis {...props} />

// base10
<YAxis scale={10} {...props} />

// natural log
<YAxis scale={Math.E} {...props} />

// snap to increments of 5
<YAxis scale={(y) => Math.round(y % 5) * 5} {...props} />

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

12reactions
pabl-o-cecommented, Apr 3, 2020

is posible add a example?

9reactions
xile611commented, Nov 18, 2016

Done in version 0.18.0.

wangwang20161118150525
Read more comments on GitHub >

github_iconTop Results From Across the Web

When to use a logarithmic axis - GraphPad Prism 9 User Guide
A logarithmic X axis is useful when the X values are logarithmically spaced. The X axis usually plots the independent variable – the...
Read more >
Stretching, Compressing, or Reflecting a Logarithmic Function
Graph stretches and compressions of logarithmic functions. ... the x-axis. When the input is multiplied by –1, the result is a reflection about...
Read more >
Logarithmic scale - Wikipedia
A logarithmic scale (or log scale) is a way of displaying numerical data over a very wide ... right graph uses a log-10...
Read more >
Using a logarithmic scale - JpGraph
The library supports the use of logarithmic scales on both the x- and y-axis (as well as the optional extra y-axis). The logarithmic...
Read more >
Automation of Axes Scale Setting in Figures using SAS Graph ...
Graph Template Language (GTL); One is to set every feature (minimum and maximum ... This statement does not assign any parameter about Y-axis...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found