Axis labels

Open
#100 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
d3, typescript

Research direction

Start with the Axis component and compare its current behavior with Observable Plot's axis marks and the linked Nivo examples. Implement the remaining checklist items: arrows with an opt-out, configurable labelOffset, and a label slot, while preserving the described rotation and placement behavior. Done means all unchecked requirements are supported by the Axis API.

Written by the indexing model from the issue text.

Description

Add <Axis label="..."> to easily support adding labels

  • Easily rotate (for y axises)but not always (better readability)
    • Automatically rotates based on position (<Axis placement="left|right" labelPlacement="middle">)
  • Support start, middle, end placement (labelPlacement)
  • Automatically add arrows (unicode: ↑ →) for non-band scales, with option to disable (labelArrow)
  • Support changing the labelOffset
    • Currently based on chart padding (similar to Observable Plot)
  • Add label slot for greater control (markup, etc)

Observable Plot axis marks is a good reference

image

image

image

image

image

See also Nivo (bar, line)

image

Dominant language
TypeScript
Stars
1.3k
Forks
41
Avg merge
2d 8h
Merged PRs (30d)
14

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from techniq/layerchart

All issues in techniq/layerchart

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.