Skip to content

Commit

Permalink
Closes elastic#55502. Fixes firefox SVG error by preventing tooltip a…
Browse files Browse the repository at this point in the history
…nd marks (elastic#56578) (elastic#56683)

from rendering if there are no values in the Plot.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
ogupte and elasticmachine committed Feb 3, 2020
1 parent 84fc957 commit 33f219f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,13 @@ class InteractivePlot extends PureComponent {

const tooltipPoints = this.getTooltipPoints(hoverX);
const markPoints = this.getMarkPoints(hoverX);
const { x, yTickValues } = plotValues;
const { x, xTickValues, yTickValues } = plotValues;
const yValueMiddle = yTickValues[1];

if (isEmpty(xTickValues)) {
return <SharedPlot plotValues={plotValues} />;
}

return (
<SharedPlot plotValues={plotValues}>
{hoverX && (
Expand Down

0 comments on commit 33f219f

Please sign in to comment.