UNPKG

lucid-ui

Version:

A UI component library from AppNexus.

31 lines 739 B
import _map from "lodash/map"; import React from 'react'; import createClass from 'create-react-class'; import { LineChart } from '../../../index'; var data = [{ x: new Date('2018-01-01T00:00:00-0800'), y: 1 }, { x: new Date('2018-01-02T00:00:00-0800'), y: 2 }, { x: new Date('2018-01-03T00:00:00-0800'), y: 3 }]; var style = { paddingTop: '5rem' }; export default createClass({ render: function render() { return /*#__PURE__*/React.createElement("div", { style: style }, /*#__PURE__*/React.createElement(LineChart, { data: data, width: 800, xAxisTicks: _map(data, 'x'), xAxisFormatter: function xAxisFormatter(date) { return date.toLocaleDateString(); } })); } });