Skip to content

Instantly share code, notes, and snippets.

@harconst
Created May 31, 2018 08:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harconst/f938598b90fef53e2cccf4a88a5845e5 to your computer and use it in GitHub Desktop.
Save harconst/f938598b90fef53e2cccf4a88a5845e5 to your computer and use it in GitHub Desktop.
Configure the state of our application
state = {
lineChartData: {
labels: [],
datasets: [
{
type: "line",
label: "BTC-USD",
backgroundColor: "rgba(0, 0, 0, 0)",
borderColor: this.props.theme.palette.primary.main,
pointBackgroundColor: this.props.theme.palette.secondary.main,
pointBorderColor: this.props.theme.palette.secondary.main,
borderWidth: "2",
lineTension: 0.45,
data: []
}
]
},
lineChartOptions: {
responsive: true,
maintainAspectRatio: false,
tooltips: {
enabled: true
},
scales: {
xAxes: [
{
ticks: {
autoSkip: true,
maxTicksLimit: 10
}
}
]
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment