UNPKG

lucid-ui

Version:

A UI component library from AppNexus.

37 lines 819 B
import React from 'react'; import createClass from 'create-react-class'; import { LineChart, Resizer } from '../../../index'; var data = [{ x: new Date('2015-01-01T00:00:00-08:00'), y: 1 }, { x: new Date('2015-01-02T00:00:00-08:00'), y: 2 }, { x: new Date('2015-01-03T00:00:00-08:00'), y: 3 }, { x: new Date('2015-01-04T00:00:00-08:00'), y: 5 }]; var style = { paddingTop: '4rem' }; export default createClass({ render: function render() { return /*#__PURE__*/React.createElement("div", { style: style }, /*#__PURE__*/React.createElement(Resizer, null, function (width /*, height */ ) { return ( /*#__PURE__*/ React.createElement(LineChart, { width: width, height: width * 0.3, data: data }) ); })); } });