JSFiddle - React, Tailwind, and code Playground
by Daniil464
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.bundle.js"></script><canvas id="project-chart" height="400" width="600"></canvas>
<script>var populationData = [{x: 0, y: 0},{x: 2,y: 0.03509390706286924},{x: 3, y: 0.16167004673309232},{x: 4,y: 0.38735561237986066},{x: 5, y: 0.5482320782999736},{x: 7,y: 0.840269817476413},{x: 10, y: 1.351203597566352},{x: 15,y: 2.328257790368272},{x: 20, y: 3.4928454816095265},{x: 25,y: 4.826084307992203},{x: 30,y: 6.166014095536413}];
var options = {
type: 'line',
data: {
datasets: [{
label: 'Population',
data: populationData,
}],
},
options: {
scales: {
xAxes: [{
type: 'linear',
}],
}
}
}
var ctx = document.getElementById('project-chart').getContext('2d');
var myChart = new Chart(ctx, options);</script>