{"action":"opened","issue":{"url":"https://api.github.com/repos/recharts/recharts/issues/386","repository_url":"https://api.github.com/repos/recharts/recharts","labels_url":"https://api.github.com/repos/recharts/recharts/issues/386/labels{/name}","comments_url":"https://api.github.com/repos/recharts/recharts/issues/386/comments","events_url":"https://api.github.com/repos/recharts/recharts/issues/386/events","html_url":"https://github.com/recharts/recharts/issues/386","id":193286165,"number":386,"title":"Using custom label with <Bar /> generates the label twice into the DOM","user":{"login":"ilanus","id":9677898,"avatar_url":"https://avatars.githubusercontent.com/u/9677898?v=3","gravatar_id":"","url":"https://api.github.com/users/ilanus","html_url":"https://github.com/ilanus","followers_url":"https://api.github.com/users/ilanus/followers","following_url":"https://api.github.com/users/ilanus/following{/other_user}","gists_url":"https://api.github.com/users/ilanus/gists{/gist_id}","starred_url":"https://api.github.com/users/ilanus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilanus/subscriptions","organizations_url":"https://api.github.com/users/ilanus/orgs","repos_url":"https://api.github.com/users/ilanus/repos","events_url":"https://api.github.com/users/ilanus/events{/privacy}","received_events_url":"https://api.github.com/users/ilanus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-03T13:12:39Z","updated_at":"2016-12-03T13:12:39Z","closed_at":null,"body":"I've made a custom label for the bar chart, I ended up with the following result:\r\n\r\n![pasted image at 2016_12_03 02_09 pm](https://cloud.githubusercontent.com/assets/9677898/20859538/2e60270a-b962-11e6-9380-85439069cc91.png)\r\n\r\nThe label is displayed at the top of the bar and at the bottom:\r\n\r\n![pasted image at 2016_12_03 02_06 pm](https://cloud.githubusercontent.com/assets/9677898/20859548/41105f14-b962-11e6-9dee-82b1688c2e01.png)\r\n\r\nHowever If I pass plain object to the label prop, the label wont be displayed twice.\r\nMy custom label:\r\n\r\n`\r\nexport const InnerBarTooltip = ({ x, y, width, height, textAnchor, sold }) =>\r\n  <text\r\n    className=\"recharts-text recharts-bar-label\"\r\n    fill=\"red\" x={x} y={Math.round(y + 20)} width={width} height={height} fontSize={20} textAnchor={textAnchor}\r\n  >\r\n    <tspan x={x} dy=\"0\" style={{ fontWeight: 400 }}>{sold}</tspan>\r\n  </text>;\r\n\r\nInnerBarTooltip.propTypes = {\r\n  x: PropTypes.number,\r\n  y: PropTypes.number,\r\n  width: PropTypes.number,\r\n  height: PropTypes.number,\r\n  textAnchor: PropTypes.string,\r\n  sold: PropTypes.number,\r\n};\r\n`\r\n"}}
{"actor":{"display_login":"ilanus"}}