Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the line seperator bug between colorLegend and SizeLegend in scatterplot charts #2830

Merged
merged 2 commits into from
Oct 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,10 @@ export class ScatterPlotChart
legendDimensions,
} = this

const sizeLegendY = bounds.top + legendDimensions.height + 16
let sizeLegendY = bounds.top
if (this.legendItems.length > 0) {
sizeLegendY = bounds.top + legendDimensions.height + 16
}
const arrowLegendY = sizeLegend
? sizeLegendY + sizeLegend.height + 15
: sizeLegendY
Expand All @@ -759,13 +762,16 @@ export class ScatterPlotChart
<VerticalColorLegend manager={this} />
{sizeLegend && (
<>
<line
x1={bounds.right - sidebarWidth}
y1={sizeLegendY - 14}
x2={bounds.right - 5}
y2={sizeLegendY - 14}
stroke="#ccc"
/>
{(this.legendItems.length > 0) && (
<line
x1={bounds.right - sidebarWidth}
y1={sizeLegendY - 14}
x2={bounds.right - 5}
y2={sizeLegendY - 14}
stroke="#ccc"
/>
)
}
{sizeLegend.render(this.legendX, sizeLegendY)}
</>
)}
Expand Down
Loading