<!-- <script>
	import { Bar } from 'svelte-chartjs';
	import { dataStore } from '../lib/dataStore';
  
	import {
	  Chart,
	  Title,
	  Tooltip,
	  Legend,
	  BarElement,
	  CategoryScale,
	  LinearScale,
	} from 'chart.js';
  
	Chart.register(
	  Title,
	  Tooltip,
	  Legend,
	  BarElement,
	  CategoryScale,
	  LinearScale
	);

	let data = {
		labels: ['accelX', 'accelY', 'accelZ', 'accelLinX', 'accelLinY', 'accelLinZ'],
		datasets: [
			{
				label: 'Sensor values',
				data: [$dataStore.accelX, $dataStore.accelY, $dataStore.accelZ, $dataStore.accelLinX, $dataStore.accelLinY, $dataStore.accelLinZ],
				backgroundColor: [
					'rgba(255, 134,159,0.4)',
					'rgba(255, 134,159,0.4)',
					'rgba(255, 134,159,0.4)',
					'rgba(113, 205, 205,0.4)',
					'rgba(113, 205, 205,0.4)',
					'rgba(113, 205, 205,0.4)',
				],
				borderWidth: 2,
				borderColor: [
					'rgba(255, 134, 159, 1)',
					'rgba(255, 134, 159, 1)',
					'rgba(255, 134, 159, 1)',
					'rgba(113, 205, 205, 1)',
					'rgba(113, 205, 205, 1)',
					'rgba(113, 205, 205, 1)',
				],
			},
		],
	};
</script>

<Bar {data} options={{ responsive: true }} /> -->