Skip to content

docs(axis): document logMapping and logLinearWidth for log axes#518

Open
netscout-mthorn wants to merge 1 commit into
apache:masterfrom
netscout-mthorn:fix-17459
Open

docs(axis): document logMapping and logLinearWidth for log axes#518
netscout-mthorn wants to merge 1 commit into
apache:masterfrom
netscout-mthorn:fix-17459

Conversation

@netscout-mthorn

Copy link
Copy Markdown

Summary

  • Add logMapping(string) = 'none' option docs to en/option/component/axis-common.md:
    documents the three values ('none', 'asinh', 'symlog'), tick placement
    behaviour, the splitNumber interaction, and the alignTicks limitation.
  • Add logLinearWidth(number) = 1 option docs: explains the quasi-linear region
    half-width shared by both 'asinh' and 'symlog' modes and its effect on the
    linear-to-log transition.
  • Update logBase description to clarify that when logMapping is 'asinh' or
    'symlog', logBase controls tick spacing rather than the transform itself.
  • Update splitNumber description to note that for logMapping axes, it controls
    how many power-of-base tick candidates are shown, with automatic skipping of
    intermediate powers when the range would produce too many.

All changes are in the shared axis partial (axis-common.md), so they apply to
xAxis, yAxis, angleAxis, radiusAxis, singleAxis, and parallelAxis without
duplication.

Not included

  • Chinese translation (zh/option/component/axis-common.md): I attempted
    node tool/patchLanguage --from=en --to=zh but it fails with
    Cannot find module '../editor/common/blockHelper'. This appears to be an
    internal dependency not available in the public repo. I am not able to provide
    a Chinese translation. If a committer is able to apply it, or can advise on the
    expected process for external contributors, that would be appreciated.

Related

Checks

  • npm run build: passes

Questions for reviewers

  • The version badges on logMapping and logLinearWidth are currently set to
    6.2.0. Is that the correct target version for this feature, or should they
    be updated?

  • The doc text references d3 and matplotlib in two places:

    1. symlog description: "This is the symlog transform used by matplotlib and d3."
    2. logLinearWidth description: "The default of 1 matches the conventions used by d3's scaleAsymlog and matplotlib's AsinhScale."

    The only existing d3 references in this repo (geo-common.md) are functional: they tell users they can use d3-geo directly with the projection API. The references above are citation-style, which has no clear precedent here. Is it appropriate to keep them? A possible middle ground: keep the symlog sentence (it names the term's origin, which aids recognition) and drop the logLinearWidth citation in favour of simply "The default is 1."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant