Skip to content

Commit

Permalink
[Lens] fix showing points on line by default (elastic#197828)
Browse files Browse the repository at this point in the history
## Summary

Fix the missing style to show points in line charts. Line charts should
show data points whenever the distance between points is larger than
40px.
  • Loading branch information
markov00 authored and tiansivive committed Oct 29, 2024
1 parent f36177f commit f5aa3e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ describe('XYChart component', () => {
const lineArea = dataLayers.find(LineSeries).at(0);
const expectedSeriesStyle = expect.objectContaining({
point: expect.objectContaining({
visible: showPoints ? 'always' : 'never',
visible: showPoints ? 'always' : 'auto',
}),
});
expect(lineArea.prop('areaSeriesStyle')).toEqual(expectedSeriesStyle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export const getSeriesName: GetSeriesNameFn = (

const getPointConfig: GetPointConfigFn = ({ markSizeAccessor, showPoints, pointsRadius }) => {
return {
visible: showPoints || markSizeAccessor ? 'always' : 'never',
visible: showPoints || markSizeAccessor ? 'always' : 'auto',
radius: pointsRadius,
fill: markSizeAccessor ? ColorVariant.Series : undefined,
};
Expand Down

0 comments on commit f5aa3e2

Please sign in to comment.