Skip to content

Add additional data to markers#403

Open
orioltf wants to merge 3 commits intoreact-component:masterfrom
unic:add-additional-data-to-markers
Open

Add additional data to markers#403
orioltf wants to merge 3 commits intoreact-component:masterfrom
unic:add-additional-data-to-markers

Conversation

@orioltf
Copy link
Copy Markdown

@orioltf orioltf commented Mar 5, 2018

This PR adds the option to bind additional data to Markers

@coveralls
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Author

orioltf commented Mar 6, 2018

There you go 😃 I hope I got your idea

@yesmeck
Copy link
Copy Markdown
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
Copy Markdown
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.

4 participants