Skip to content

Instantly share code, notes, and snippets.

@BetterProgramming
Created January 6, 2020 23:11
Show Gist options
  • Save BetterProgramming/069b79fb9e24e6819807eac5e507531e to your computer and use it in GitHub Desktop.
Save BetterProgramming/069b79fb9e24e6819807eac5e507531e to your computer and use it in GitHub Desktop.
...
import { AreaChart, Tooltip, Area } from "recharts";
...
...
<AreaChart data={dataArr} height={250} width={700}>
<Tooltip
contentStyle={styles.tooltipWrapper}
labelStyle={styles.tooltip}
formatter={value => `${value}`}
/>
<Area
dataKey="Total"
stroke="none"
fillOpacity={1}
fill="#f7931a"
/>
</AreaChart>
...
const styles = {
container: {
maxWidth: 700,
margin: "0 auto"
},
tooltipWrapper: {
background: "#444444",
border: "none"
},
tooltip: {
color: "#ebebeb"
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment