content: import React from 'react'
  import '../css/axis.less'
  import Rectangle from './rectangle'
  import Circle from './circle'
  
  class Axis extends React.Component {
      constructor(props) {
          super(props);
      }
  
      render() {
          let {items, offsetX, onLabelClick} = this.props;
          return <div className="axis">
              {
                  items.map((item) => {
                      if (item.Type === "circle") {
                          return (
                              <Circle key={item.key} item={item} offsetX={offsetX} onLabelClick={onLabelClick}/>
                          );
                      } else {
                          return (
                              <Rectangle key={item.key} item={item} offsetX={offsetX} onLabelClick={onLabelClick}/>
                          );
                      }
                  })
              }
          </div>
  
      }
  }
  
  export default Axis