A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/kurkle/chartjs-chart-matrix below:

kurkle/chartjs-chart-matrix: Chart.js module for creating matrix charts

<html>
<head>
  <script src="https://cdn.jsdelivr.net/npm/chart.js@3.7"></script>
  <script src="https://cdn.jsdelivr.net/npm/chartjs-chart-matrix@1.1"></script>
</head>
<body>
  <div class="chart-container">
    <canvas id="matrix-chart">
  </div>
  <script>
    const chart = new Chart('matrix-chart', {
      type: 'matrix',
      data: {
        datasets: [{
          label: 'Basic matrix',
          data: [{x: 1, y: 1}, {x: 2, y: 1}, {x: 1, y: 2}, {x: 2, y: 2}],
          borderWidth: 1,
          borderColor: 'rgba(0,0,0,0.5)',
          backgroundColor: 'rgba(200,200,0,0.3)',
          width: ({chart}) => (chart.chartArea || {}).width / 2 - 1,
          height: ({chart}) => (chart.chartArea || {}).height / 2 - 1,
        }],
      },
      options: {
        scales: {
          x: {
            display: false,
            min: 0.5,
            max: 2.5,
            offset: false
          },
          y: {
            display: false,
            min: 0.5,
            max: 2.5
          }
        }
      }
    });
  </script>
</body>

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4