You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is no simple way (or no way at all?) to discover the transform of a scaleSequential{Log,Symlog,Sqrt…} scale, which makes it difficult to generate an automatic legend.
scale.ticks() can be a proxy to this information, but it might be nice to be able to read the transform directly.
The text was updated successfully, but these errors were encountered:
In general d3-scale does not support inspection of scale types, so I wouldn’t expect it would support inspection of scale transforms either (if we did support generic transforms, which we do not). The hope is that the scale implementation encapsulates the behavior, and then things like axes and legends don’t need type-specific (or transform-specific) logic, which would make the axis or legend incompatible with future types.
Concretely the question came from trying to adapt https://observablehq.com/@mbostock/color-ramp to a d3.scaleSequentialLog(); knowledge of the domain is not enough to “invert” the scale and generate the ~512 uniformly spaced points we would like to have.
Using ticks() is not an option in this case, since they can't give us 500 values on a log-scale domain of e.g. [1e-7, 1e7]. But maybe that's a different issue (related: #44#100 & #162).
Currently there is no simple way (or no way at all?) to discover the transform of a scaleSequential{Log,Symlog,Sqrt…} scale, which makes it difficult to generate an automatic legend.
scale.ticks() can be a proxy to this information, but it might be nice to be able to read the transform directly.
The text was updated successfully, but these errors were encountered: