render()

in src/XGrid.js [36:73]


  render() {
    const {
      height,
      xScale,
      tickCount,
      lineClassName,
      lineStyle,
      spacingTop,
      spacingBottom,
      spacingLeft,
      spacingRight,
    } = this.props;
    const ticks = this.props.ticks || getScaleTicks(xScale, null, tickCount);
    const className = `rct-chart-grid-line ${lineClassName || ''}`;

    return (
      <g className="rct-chart-grid-x" aria-hidden="true">
        {ticks.map((tick, i) => {
          return (
            <XLine
              {...{
                height,
                xScale,
                className,
                spacingTop,
                spacingBottom,
                spacingLeft,
                spacingRight,
                value: tick,
                style: lineStyle,
                key: `grid-x-line-${i}`,
              }}
            />
          );
        })}
      </g>
    );
  }