import React, { Component } from 'react'; import { Chart, Axis, Tooltip, Geom } from 'bizcharts'; import styles from '../index.less'; class Bar extends Component { state = { height: 0, autoHideXLabels: false, }; handleRoot = n => { this.root = n; }; handleRef = n => { this.node = n; }; render() { const { height: propsHeight, title, forceFit = true, data, color = 'rgba(24, 144, 255, 0.85)', padding, } = this.props; const { autoHideXLabels } = this.state; const scale = { x: { type: 'cat', }, y: { min: 0, }, }; const tooltip = [ 'x*y', (x, y) => ({ name: x, value: y, }), ]; const { height: stateHeight } = this.state; const height = propsHeight || stateHeight; return (