function doScatterChartStuff(chart, datas, index, { yExtent, yExtents }) {
  chart.keyAccessor(d => d.key[0]).valueAccessor(d => d.key[1]);

  if (chart.radiusValueAccessor) {
    const isBubble = datas[index][0].length > 2;
    if (isBubble) {
      const BUBBLE_SCALE_FACTOR_MAX = 64;
      chart
        .radiusValueAccessor(d => d.value)
        .r(
          d3.scale
            .sqrt()
            .domain([0, yExtent[1] * BUBBLE_SCALE_FACTOR_MAX])
            .range([0, 1]),
        );
    } else {
      chart.radiusValueAccessor(d => 1);
      chart.MIN_RADIUS = 3;
    }
    chart.minRadiusWithLabel(Infinity);
  }
}
// TODO - give this a good name when I figure out what it does
give this a good name when I figure out what it does
give this a good name when I figure out what it does
function doScatterChartStuff(chart, datas, index, { yExtent, yExtents }) {
  chart.keyAccessor(d => d.key[0]).valueAccessor(d => d.key[1]);
  if (chart.radiusValueAccessor) {
    const isBubble = datas[index][0].length > 2;
    if (isBubble) {
      const BUBBLE_SCALE_FACTOR_MAX = 64;
      chart
        .radiusValueAccessor(d => d.value)
        .r(
          d3.scale
            .sqrt()
            .domain([0, yExtent[1] * BUBBLE_SCALE_FACTOR_MAX])
            .range([0, 1]),
        );
    } else {
      chart.radiusValueAccessor(d => 1);
      chart.MIN_RADIUS = 3;
    }
    chart.minRadiusWithLabel(Infinity);
  }
}
function doScatterChartStuff ( chart , datas , index , { yExtent , yExtents } ) { chart . keyAccessor ( d => d . key [ 0 ] ) . valueAccessor ( d => d . key [ 1 ] ) ; if ( chart . radiusValueAccessor ) { const isBubble = datas [ index ] [ 0 ] . length > 2 ; if ( isBubble ) { const BUBBLE_SCALE_FACTOR_MAX = 64 ; chart . radiusValueAccessor ( d => d . value ) . r ( d3 . scale . sqrt ( ) . domain ( [ 0 , yExtent [ 1 ] * BUBBLE_SCALE_FACTOR_MAX ] ) . range ( [ 0 , 1 ] ) , ) ; } else { chart . radiusValueAccessor ( d => 1 ) ; chart . MIN_RADIUS = 3 ; } chart . minRadiusWithLabel ( Infinity ) ; } }
TODO - give this a good name when I figure out what it does
TODO - give this a good name when I figure out what it does