How to use the recharts.AreaChart function in recharts

To help you get started, we’ve selected a few recharts 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 streamlit / streamlit / frontend / src / elements / Chart.js View on Github external
tableGet,
  INDEX_COLUMN_DESIGNATOR,
} from '../dataFrameProto';
import { format, Duration } from '../format';
import { PureStreamlitElement } from './util/StreamlitElement';

import * as recharts from 'recharts';

import './Chart.css';

const COMPONENTS = {
  ////////////
  // Charts //
  ////////////

  AreaChart         : recharts.AreaChart,
  BarChart          : recharts.BarChart,
  LineChart         : recharts.LineChart,
  ComposedChart     : recharts.ComposedChart,
  // PieChart       <- not implemented
  RadarChart        : recharts.RadarChart,
  // RadialBarChart <- not implemented
  // ScatterChart   <- not implemented
  Treemap           : recharts.Treemap,

  ////////////////////////
  // General Components //
  ////////////////////////

  // ResponsiveContainer, <- not implemented
  Area              : recharts.Area,
  Legend            : recharts.Legend,
github streamlit / streamlit / frontend / src / components / elements / Chart / Chart.tsx View on Github external
tableGet,
  INDEX_COLUMN_DESIGNATOR,
} from "lib/dataFrameProto"
import { format, Duration } from "lib/format"
import { Map as ImmutableMap } from "immutable"
import withFullScreenWrapper from "hocs/withFullScreenWrapper"
import * as recharts from "recharts"

import "./Chart.scss"

const COMPONENTS: any = {
  ////////////
  // Charts //
  ////////////

  AreaChart: recharts.AreaChart,
  BarChart: recharts.BarChart,
  LineChart: recharts.LineChart,
  ComposedChart: recharts.ComposedChart,
  // PieChart       <- not implemented
  RadarChart: recharts.RadarChart,
  // RadialBarChart <- not implemented
  // ScatterChart   <- not implemented
  Treemap: recharts.Treemap,

  ////////////////////////
  // General Components //
  ////////////////////////

  // ResponsiveContainer, <- not implemented
  Area: recharts.Area,
  Legend: recharts.Legend,
github hackoregon / component-library / lib / AreaChart / AreaChart.js View on Github external
{
          key: 'color' + index,
          id: 'color' + index,
          x1: '0', y1: '0', x2: '0', y2: '1'
        },
        _react2.default.createElement('stop', { offset: '5%', stopColor: colors[index], stopOpacity: 0.8 }),
        _react2.default.createElement('stop', { offset: '95%', stopColor: colors[index], stopOpacity: 0.1 })
      ));
    }
  });

  return _react2.default.createElement(
    'div',
    { style: { display: 'flex', justifyContent: 'space-around', margin: 'auto' } },
    _react2.default.createElement(
      _recharts.AreaChart,
      { width: 730, height: 250, data: data },
      _react2.default.createElement(_recharts.Legend, { layout: 'vertical', iconType: 'square', verticalAlign: 'top', align: 'left' }),
      _react2.default.createElement(
        'defs',
        null,
        gradients
      ),
      _react2.default.createElement(_recharts.XAxis, { dataKey: 'name' }),
      _react2.default.createElement(_recharts.YAxis, null),
      _react2.default.createElement(_recharts.CartesianGrid, { strokeDasharray: '3 3' }),
      _react2.default.createElement(_recharts.Tooltip, null),
      lines
    )
  );
};