Skip to content

Commit

Permalink
[fix] Fix regression line rendering issue on scatterplot exported ima…
Browse files Browse the repository at this point in the history
…ge (#2157)

* [fix] Fix issue with rendering applied regression line on exported scatter plot image
  • Loading branch information
KaroMourad authored Sep 9, 2022
1 parent 1abec74 commit dc6d44d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Fixes:

- Fix the regression line rendering issue on Scatter plot exported image (KaroMourad)

## 3.13.1 Sep 1, 2022

- Add support for querying metrics by last value (mihran113)
Expand Down
6 changes: 0 additions & 6 deletions aim/web/ui/src/components/ScatterPlot/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,4 @@
opacity: 1;
}
}
.RegressionLine {
stroke-width: 2.2;
opacity: 1;
fill: none;
stroke: $error-color;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
.SelectDropdown {
position: relative;
&__popper {
z-index: 5;
.MuiAutocomplete-groupLabel {
color: $text-color-50;
font-size: $text-sm;
Expand Down
4 changes: 4 additions & 0 deletions aim/web/ui/src/components/kit/Slider/Slider.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
font-weight: $font-600;
color: $primary-color;
transform: unset;
text-overflow: ellipsis;
max-width: 100%;
overflow: hidden;
padding: $space-xxxxs $space-xxxs;
}
}
&.Mui-focusVisible {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,10 @@
background-color: $white;
}
&__depthSlider {
position: absolute;
padding: 0;
z-index: 1;
background-color: white;
width: calc(100% - 2px);
height: 1.75rem;
left: 1px;
bottom: 0;
& > .Slider {
width: 100%;
max-width: 46rem;
Expand Down
5 changes: 4 additions & 1 deletion aim/web/ui/src/utils/d3/drawScatterTrendline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ function drawScatterTrendline({
.datum(regressionPoints)
.classed('RegressionLine', true)
.attr('clip-path', `url(#${nameKey}-lines-rect-clip-${index})`)
.attr('d', line);
.attr('d', line)
.attr('stroke-width', 2.2)
.attr('fill', 'none')
.attr('stroke', '#E64E48FF'); // error-color
}

export default drawScatterTrendline;

0 comments on commit dc6d44d

Please sign in to comment.