From de25eef2f6db0ee7b16390fd8cb66b2ce8a740db Mon Sep 17 00:00:00 2001 From: Roman Galochkin Date: Wed, 4 Mar 2020 09:11:23 +0300 Subject: [PATCH] Fixes code style --- .../charts/DistributionPlot/distPlotReact.js | 51 +++++++++---------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/src/components/charts/DistributionPlot/distPlotReact.js b/src/components/charts/DistributionPlot/distPlotReact.js index 21f237cb..2565cf99 100644 --- a/src/components/charts/DistributionPlot/distPlotReact.js +++ b/src/components/charts/DistributionPlot/distPlotReact.js @@ -35,32 +35,31 @@ function CdfChartReact(props) { useEffect(() => { try { - new CdfChartD3() - .set('svgWidth', width) - .set('svgHeight', props.height) - .set('maxX', props.maxX) - .set('minX', props.minX) - .set('onHover', props.onHover) - .set('marginBottom',props.marginBottom || 15) - .set('marginLeft', 30) - .set('marginRight', 30) - .set('marginTop', 5) - .set('showDistributionLines', props.showDistributionLines) - .set('showDistributionYAxis', props.showDistributionYAxis) - .set('verticalLine', props.verticalLine || 110) - .set('showVerticalLine', props.showVerticalLine) - .set('container', containerRef.current) - .set('scale', scale) - .set('timeScale', props.timeScale) - .set('yMaxContinuousDomainFactor', props.yMaxContinuousDomainFactor || 1) - .set('yMaxDiscreteDomainFactor', props.yMaxDiscreteDomainFactor || 1) - .data({ - continuous: props.continuous, - discrete: props.discrete, - }) - .render(); - } - catch(e) { + new CdfChartD3() + .set('svgWidth', width) + .set('svgHeight', props.height) + .set('maxX', props.maxX) + .set('minX', props.minX) + .set('onHover', props.onHover) + .set('marginBottom', props.marginBottom || 15) + .set('marginLeft', 30) + .set('marginRight', 30) + .set('marginTop', 5) + .set('showDistributionLines', props.showDistributionLines) + .set('showDistributionYAxis', props.showDistributionYAxis) + .set('verticalLine', props.verticalLine || 110) + .set('showVerticalLine', props.showVerticalLine) + .set('container', containerRef.current) + .set('scale', scale) + .set('timeScale', props.timeScale) + .set('yMaxContinuousDomainFactor', props.yMaxContinuousDomainFactor || 1) + .set('yMaxDiscreteDomainFactor', props.yMaxDiscreteDomainFactor || 1) + .data({ + continuous: props.continuous, + discrete: props.discrete, + }) + .render(); + } catch (e) { console.error("distPlotD3 Error: ", e) } });