Created
September 21, 2017 14:49
-
-
Save dance2die/3c7bd30aa6f54d3dc62ab279fd2a8847 to your computer and use it in GitHub Desktop.
using short id for a unique graph_id
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import shortid from 'shortid'; | |
... | |
const visitors = graphDetails | |
.map(visitor => { | |
const id = shortid.generate(); | |
... | |
return ( | |
<Chart | |
chartType="LineChart" | |
... | |
graph_id={id} | |
... | |
/>); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment