Skip to content
Snippets Groups Projects
Select Git revision
  • 6fc2e0cdba5f5c4b6b1f2b6cb25dfbb9f253976d
  • develop default
  • master protected
  • async-provision
  • DBOARD3-1252/inventory-api
  • 0.90
  • 0.89
  • 0.88
  • 0.87
  • 0.86
  • 0.85
  • 0.84
  • 0.83
  • 0.82
  • 0.81
  • 0.80
  • 0.79
  • 0.78
  • 0.77
  • 0.76
  • 0.75
  • 0.74
  • 0.73
  • 0.72
  • 0.71
25 results

setup.py

Blame
  • LineGraph.tsx 801 B
    import React, { ReactElement } from 'react';
    import { Line } from 'react-chartjs-2';
    
    
    import {
      Chart as ChartJS,
      CategoryScale,
      LinearScale,
      PointElement,
      LineElement,
      Title,
      Tooltip,
      Legend,
    } from 'chart.js';
    import {BasicDataset} from "../../Schema";
    
    
    ChartJS.register(
      CategoryScale,
      LinearScale,
      PointElement,
      LineElement,
      Title,
      Tooltip,
      Legend
    );
    
    const options = {
      responsive: true,
      plugins: {
        legend: {
          position: 'top' as const,
          onClick: () => { /* intentionally empty */ },
        },
        title: {
          display: true,
          text: '',
        },
      },
    };
    
    interface inputProps {
        data: BasicDataset
    }
    
    function LineGraph({data}: inputProps): ReactElement {
      return (
        <Line data={data} options={options} />
      );
    }
    
    export default LineGraph;