Closed smarandaparincu closed 7 months ago
As log(0) = -∞, a log scale domain must be strictly-positive or strictly-negative; the domain must not include or cross zero. A log scale with a positive domain has a well-defined behavior for positive values, and a log scale with a negative domain has a well-defined behavior for negative values. (For a negative domain, input and output values are implicitly multiplied by -1.) The behavior of the scale is undefined if you pass a negative value to a log scale with a positive domain or vice versa.
You migth be looking to https://d3js.org/d3-scale/symlog that we do not support for now.
I'm quite surprised that you need a log scale with positive and negative values. Except in physics I never saw such graphs. COuld you share what's you're usecase?
The issue has been inactive for 7 days and has been automatically closed.
Steps to reproduce
Try the following code:
Current behavior
From debugging the logs, it seems like the reflective function is applied on the positive value of the domain instead of the negative one. This results in the
Math.log
returningNaN
valuesExpected behavior
Reflective function should have been applied on the negative part of the domain
Context
No response
Your environment
``` Don't forget to mention which browser you used. Output from `npx @mui/envinfo` goes here. ```npx @mui/envinfo
Search keywords: mui-x/charts log scale axis