Skip to content

dynamic-smart-labels#799

Open
cycle4passion wants to merge 1 commit intotechniq:nextfrom
cycle4passion:dynamics-labels
Open

dynamic-smart-labels#799
cycle4passion wants to merge 1 commit intotechniq:nextfrom
cycle4passion:dynamics-labels

Conversation

@cycle4passion
Copy link

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Mar 2, 2026

⚠️ No Changeset found

Latest commit: 5e7870b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 2, 2026

Open in StackBlitz

npm i https://pkg.pr.new/layerchart@799

commit: e4ba01b

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
layerchart ✅ Ready (View Log) Visit Preview 5e7870b

{:else if labels}
{#each seriesState.visibleSeries as s, i (s.key)}
<Labels {...getLabelsProps(s, i)} />
<Labels {...getLabelsProps(s, i)} placement="smart" />
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

placement="smart" should come before getLabelProps so it can be overridden (ex. Labels within points)

Image

Note: where this is handled is changing within state-refactor branch/PR, which is going to cause a merge conflict. I might keep this PR open and manually merge into state-refactor once the dust settles there.

}
}

function getDynamicTextProps(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's call this getSmartTextProps(), although I wonder if we could merge this into getTextProps() (instead of early returning in getTextProps(), capture the baseProps and then use them if placement === 'smart' or return as is if not.

Although not sure how much of baseProps we really need at first glance

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.

2 participants