Skip to content

Instantly share code, notes, and snippets.

@ryan-hamblin
Created July 3, 2016 15:52
Show Gist options
  • Save ryan-hamblin/6b8c1f9601abc2626696d2f1668ce362 to your computer and use it in GitHub Desktop.
Save ryan-hamblin/6b8c1f9601abc2626696d2f1668ce362 to your computer and use it in GitHub Desktop.
let tooltipLine = function(label, data) {
return data.y;
}
I'm loading the data in via componentDidMount and pushing the array to state. The data is loading fine. I just get
errors when trying to use the toolTip functionality. Do I need to define "Xscale on my own?".
return (
<LineChart
data={this.state.data}
width={825}
height={250}
margin={{top: 10, bottom: 50, left: 50, right: 10}}
tooltipHtml={tooltipLine}
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment