0% found this document useful (0 votes)
52 views1 page

Code Sample

The document contains JavaScript code for creating a line chart using the Chart.js library. It defines a dataset with monthly labels and corresponding data points, including various styling options for the chart. The chart is then instantiated with the specified data and options.

Uploaded by

nerdkusi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views1 page

Code Sample

The document contains JavaScript code for creating a line chart using the Chart.js library. It defines a dataset with monthly labels and corresponding data points, including various styling options for the chart. The chart is then instantiated with the specified data and options.

Uploaded by

nerdkusi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

var data = {

labels: ["January", "February", "March", "April", "May", "June", "July"],


datasets: [
{
label: "My First dataset",
fill: false,
lineTension: 0.1,
backgroundColor: "rgba(75,192,192,0.4)",
borderColor: "rgba(75,192,192,1)",
borderCapStyle: 'butt',
borderDash: [],
borderDashOffset: 0.0,
borderJoinStyle: 'miter',
pointBorderColor: "rgba(75,192,192,1)",
pointBackgroundColor: "#fff",
pointBorderWidth: 1,
pointHoverRadius: 5,
pointHoverBackgroundColor: "rgba(75,192,192,1)",
pointHoverBorderColor: "rgba(220,220,220,1)",
pointHoverBorderWidth: 2,
pointRadius: 1,
pointHitRadius: 10,
data: [65, 59, 80, 81, 56, 55, 40],
spanGaps: false,
}
]
};
var myLineChart = new Chart(ctx, {
type: 'line',
data: data,
options: {}
});

You might also like