akshat-lakhera opened a new pull request, #45646: URL: https://github.com/apache/superset/pull/45646
### SUMMARY Since #41174, formula annotation lines on timeseries charts are drawn on top of the chart's point markers and data labels. That PR gave the formula annotation series a z of 10 so annotations would sit in front, but a line series already defaults to z 2, so the extra z pushes the annotation line over everything else on the chart. On charts with a horizontal threshold line it hides the markers and value labels it crosses. I removed the z override from transformFormulaAnnotation, so the formula line goes back to the default layer and the series markers and labels are drawn on top of it again. The tooltip part of #41174 is not touched. I added a unit test in transformers.test.ts that checks the formula annotation series does not get a z above the default line series. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF Line chart on birth_names (yearly sum of num, 1992 to 2008) with markers and value labels on, and a formula annotation at 1683000. I made the annotation line wider so the overlap is easy to see. Before: <img width="1400" height="900" alt="before_full" src="https://github.com/user-attachments/assets/964e9a80-52d2-490b-9ea4-b5955ace4d71" /> <img width="1200" height="640" alt="before_zoom" src="https://github.com/user-attachments/assets/dcff5ed6-4692-4339-96f1-a54798eead3d" /> After: <img width="1400" height="900" alt="after_full" src="https://github.com/user-attachments/assets/204ff1da-d9df-442d-b77d-9e7ba442018c" /> <img width="1200" height="640" alt="after_zoom" src="https://github.com/user-attachments/assets/1cbdd69e-f89d-414d-93fa-e96ac4ebef2d" /> ### TESTING INSTRUCTIONS 1. Open a Line Chart with markers and data labels turned on. 2. Add a Formula annotation layer with a constant value that crosses some points. 3. Before this change the annotation line covers the markers and labels it crosses. With this change the markers and labels are drawn on top of the line. 4. Run the unit tests: npm run test -- plugins/plugin-chart-echarts/test/Timeseries/transformers.test.ts -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
