Forum Discussion
Vertical Event Lines on a Trend Graph (Line Chart)
We are using a line chart to show trends over time -- dates along the X axis, metrics along Y. Pretty straightforward. We have a request to show vertical lines on specific dates (on the X axis) to represent an event -- a plant closure, process change, whatever. These events will come from a table (columns: date, event_text). The user might hover over the vertical line to see event text as a tooltip, or maybe it's accessible some other way.
The line chart allows adding constant lines, but I need something dynamic, even if it's a hack, such as overlapping visuals with the top one transparent. Third party visuals are only an option for us if they are PBI Certified.
Slight rant, but our users are tired of hearing Power BI can't do that. This particular request isn't far fetched at all, and my searching indicates that it comes up a lot. Still I can't find an accpetable, sustainable solution.
Here are some YouTube videos that almost deliver. The first one uses bars (can't be sized), the second uses points on the trend line (data is hard coded in DAX).
https://www.youtube.com/watch?v=6OgJX21cgMg
https://www.youtube.com/watch?v=XKmTknbusnY
I'm eager to hear your ideas. Thank you.
4 Replies
- AnonymousNot applicable
Hi bvy,
Maybe you can try to use r visual, it allows you to plot the graph that combines charts with different effects.
abline R function : An easy way to add straight lines to a plot using R software
Regards,
Xiaoxin Sheng