How to use the react-chartjs-2.Line function in react-chartjs-2

To help you get started, we’ve selected a few react-chartjs-2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jerairrest / react-chartjs-2 / example.js View on Github external
render: function render() {
    return _react2.default.createElement(
      'div',
      null,
      _react2.default.createElement(
        'h2',
        null,
        'Line Example'
      ),
      _react2.default.createElement(_reactChartjs.Line, { data: data })
    );
  }
});
github nasa / cumulus / gibs-dashboard / app / scripts / components / performance-chart.js View on Github external
'use strict';

/**
 * Defines a chart for displaying workflow performance.
 */

const React = require('react');
const LineChart = require('react-chartjs-2').Line;
const { Modal, ModalClickable, ModalContent } = require('./modal');

/**
 * Returns the chart options to use for a normal sized chart on a page.
 */
const regularChartOptions = title => ({
  responsive: true,
  maintainAspectRatio: false,
  title: {
    display: true,
    text: title
  },
  scales: {
    xAxes: [{
      type: 'time',
      time: {