UNPKG

lucid-ui

Version:

A UI component library from AppNexus.

19 lines (18 loc) 650 B
import React from 'react'; import createClass from 'create-react-class'; import { Axis, d3Scale } from '../../../index'; const margin = { top: 10, bottom: 10 }; const width = 50; const height = 200; const innerHeight = height - margin.top - margin.bottom; const y = d3Scale .scaleLinear() .domain([0, 100000]) .range([innerHeight, 0]); export default createClass({ render() { return (React.createElement("svg", { width: width, height: height }, React.createElement("g", { transform: `translate(${width - 1}, ${margin.top})` }, React.createElement(Axis, { scale: y, orient: 'left' })))); }, });