diff --git a/src/components/charts/DistPlusPlot.re b/src/components/charts/DistPlusPlot.re
index 083986e7..32be15ad 100644
--- a/src/components/charts/DistPlusPlot.re
+++ b/src/components/charts/DistPlusPlot.re
@@ -158,19 +158,21 @@ module DistPlusChart = {
distPlus |> Distributions.DistPlus.T.toDiscreteProbabilityMass;
let (yMaxDiscreteDomainFactor, yMaxContinuousDomainFactor) =
adjustBoth(toDiscreteProbabilityMass);
- ;
+
dispatch(CHANGE_HEIGHT(state.height + 40))}>
{"HightPlus" |> ReasonReact.string}
- dispatch(CHANGE_HEIGHT(state.height - 40))}>
+
+ dispatch(
+ CHANGE_HEIGHT(state.height < 81 ? state.height : state.height - 40),
+ )
+ }>
{"HightMinus" |> ReasonReact.string}
chart
diff --git a/src/components/charts/DistributionPlot/distPlotD3.js b/src/components/charts/DistributionPlot/distPlotD3.js
index 5b1b3c31..99b73db7 100644
--- a/src/components/charts/DistributionPlot/distPlotD3.js
+++ b/src/components/charts/DistributionPlot/distPlotD3.js
@@ -407,7 +407,7 @@ export class CdfChartD3 {
.attr('r', 6);
tooltip.transition()
.style('opacity', .9);
- tooltip.html(`X: ${d.x}, Y: ${d.y}`)
+ tooltip.html(`x: ${d.x}, y: ${(d.y * 100).toFixed(1)}%`)
.style('left', (common.xScale(d.x) + 60) + 'px')
.style('top', yScale(d.y) + 'px');
}
diff --git a/src/components/charts/DistributionPlot/distPlotReact.js b/src/components/charts/DistributionPlot/distPlotReact.js
index 1220b8fe..21f237cb 100644
--- a/src/components/charts/DistributionPlot/distPlotReact.js
+++ b/src/components/charts/DistributionPlot/distPlotReact.js
@@ -34,6 +34,7 @@ function CdfChartReact(props) {
});
useEffect(() => {
+ try {
new CdfChartD3()
.set('svgWidth', width)
.set('svgHeight', props.height)
@@ -58,6 +59,10 @@ function CdfChartReact(props) {
discrete: props.discrete,
})
.render();
+ }
+ catch(e) {
+ console.error("distPlotD3 Error: ", e)
+ }
});
return React.createElement("div", {