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
VizLegend: Represent line style in series legend and tooltip #87558
Conversation
would it be possible to avoid extra DOM here? especially for tooltip that has to re-render up to 60 times per sec, this will add a lot of overhead for something that we might be able to do with a single |
be3eb85
to
2160ed1
Compare
I'll try. What's the case where dom is recreated 60 times per second though? :-O would React.memo'ing the divs work too? |
sorry, i usually mean react's v-tree, which very unfree to re-create on ever mousemove. imagine you have 30 series in a tooltip. and dashboard shared tooltip enabled. this adds up very fast. |
thanks :) |
So border did not work out, too inconsistent across borwsers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome! ❤️
What is this feature?
This PR makes panel legend & viz tooltip color indicator also represent line style of a series: solid, dotted or dashed. Only works if gradient is not set, because we can't represent it in dashed/ dotted form with current appraoch.
Why do we need this feature?
This is especially useful with time comparison feature where UX calls for comparison series to have same color but different line style. Eg, app o11y uses dashed lines for previous period series. Without legend representing line style it is harder to distinguish legend items.
Who is this feature for?
Dashboard users, plugins.
Special notes for your reviewer:
I went ahead and made viz tooltip reuse
SeriesIcon
component for color indicatorPlease check that: