Init
This commit is contained in:
40
main.js
Normal file
40
main.js
Normal file
@@ -0,0 +1,40 @@
|
||||
import './css/style.css';
|
||||
import Chart from 'chart.js/auto';
|
||||
import data from './data.json';
|
||||
|
||||
// Let's start
|
||||
console.log('%cYour data is here ⬇', 'background-color: green; color: white');
|
||||
console.log(data); // => your data
|
||||
// Your code here ...
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Chart.js - code snippet to get you started and that you can modify
|
||||
const ctx = document.getElementById('chartCanavs').getContext('2d');
|
||||
const chart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
// ... YOUR DATA HERE!
|
||||
// might start looking at here: https://www.chartjs.org/docs/next/
|
||||
},
|
||||
// Some preset options for your!
|
||||
options: {
|
||||
maintainAspectRatio: false,
|
||||
plugins: {
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
},
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user