UNPKG

safety-results-over-time

Version:

Chart showing population averages for lab measures, vital signs and other related measures during the course of a clinical trial.

18 lines (16 loc) 689 B
import { scale } from 'd3'; export default function defineScales(subgroup) { subgroup.boxplot.x = scale.linear().range([0, this.x.rangeBand()]); subgroup.boxplot.left = subgroup.boxplot.x(0.5 - subgroup.boxplot.boxPlotWidth / 2); subgroup.boxplot.right = subgroup.boxplot.x(0.5 + subgroup.boxplot.boxPlotWidth / 2); subgroup.boxplot.y = this.config.y.type === 'linear' ? scale .linear() .range([this.plot_height, 0]) .domain(this.y.domain()) : scale .log() .range([this.plot_height, 0]) .domain(this.y.domain()); }