Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional data to markers #403

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

orioltf
Copy link

@orioltf orioltf commented Mar 5, 2018

This PR adds the option to bind additional data to Markers

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 86.173% when pulling 7e788d1 on unic:add-additional-data-to-markers into a32ba64 on react-component:master.

@yesmeck
Copy link
Member

yesmeck commented Mar 6, 2018

We can pass all the reset properties of mark to the element.

if (markPointIsObject) {
  const { label, style, ...resetProps } = markPoint;
}

<span {...resetProps>{label}</span>

@orioltf
Copy link
Author

orioltf commented Mar 6, 2018

There you go 😃 I hope I got your idea

@yesmeck
Copy link
Member

yesmeck commented Mar 6, 2018

I mean we can write mark prop on the config object directly.

const marks = [{
 label: '85°C',
 id: 'custom-id',
}];

if (markPointIsObject) {
  const { label, style, ...resetProps } = markPoint;
}

<span {...resetProps>{label}</span>

@yoyo837
Copy link
Member

yoyo837 commented Apr 15, 2023

Rebase please.

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.

None yet

4 participants