Skip to content

Instantly share code, notes, and snippets.

@gpDA
Last active May 2, 2019 15:37
Show Gist options
  • Save gpDA/f6f8b97b5ad94679ce42998cd2468c79 to your computer and use it in GitHub Desktop.
Save gpDA/f6f8b97b5ad94679ce42998cd2468c79 to your computer and use it in GitHub Desktop.
// ./components/Chart/Chart.js
// data for LINE
const chart_data = {
// x_axis (time range)
labels: x_axis,
// dataset LINE1
datasets: [{
label: "line1",
lineTension: 0.1,
fill: false,
pointHoverBackgroundColor: "yellow",
borderColor: "purple",
pointRadius: 4,
pointHitRadius: 10,
// data (line1)
data: line_line1,
},
// dataset LINE2
{
label: "line2",
lineTension: 0.1,
fill: false,
pointHoverBackgroundColor: "brown",
borderColor: "green",
pointRadius: 4,
pointHitRadius: 10,
// data (line2)
data: line_line2
},
// dataset LINE3
{
label: "line3",
lineTension: 0.1,
fill: false,
pointHoverBackgroundColor: "brown",
borderColor: "red",
pointRadius: 4,
pointHitRadius: 10,
// data (line3)
data: line_line3
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment