Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

How to create a line chart with range area in the background

Hello,

I am trying to create a Line chart with a range in the background (See pic below). The idea of the range is to show the normal range for the plot; anything outside of the range is considered abnormal. We want users to see whether the data point is within the range or outside the range. The screenshot shows how the graph looks like in R shiny, where the green area in the background represents the range, and the line represents the actual data points.   Is there a way that I can recreate this in PowerBI? I really appreciate any advice. Thanks

 

Jasleenm_0-1617722626134.png

 

2 ACCEPTED SOLUTIONS
v-yuaj-msft
Community Support
Community Support

Hi @Anonymous ,

 

After some research, I suggest that you can use R or Python visuals in Power BI Desktop. You can create the chart using the "Polygon()" function. Here is my test.

v-yuaj-msft_0-1618911201532.png

Result:

v-yuaj-msft_1-1618911236160.png

polygon() 

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

Anonymous
Not applicable

8 REPLIES 8
radhey_rec
Resolver II
Resolver II

Hi @Anonymous,

 

If you can user custom visuals, you can try https://pbivizedit.com

I am able to create following chart:

radhey_rec_0-1640076091702.png

with the following data:

radhey_rec_1-1640076117692.png

 

Please note that, these visuals do not support (yet):

1. Native tooltips of Power BI.

2. selection of data points for further filtering.

 

Thanks,

-R

 

v-yuaj-msft
Community Support
Community Support

Hi @Anonymous ,

 

After some research, I suggest that you can use R or Python visuals in Power BI Desktop. You can create the chart using the "Polygon()" function. Here is my test.

v-yuaj-msft_0-1618911201532.png

Result:

v-yuaj-msft_1-1618911236160.png

polygon() 

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

That looks like a great solution. I'll be grateful if you could post the R code that you used to produce that result. With no knowledge at all of R, I tried to figure it out myself from on-line documentation and didn't get very far.
Assuming it is R, of course.

Anonymous
Not applicable

@v-yuaj-msft thanks alot it worked.

v-yuaj-msft
Community Support
Community Support

Hi @Anonymous ,

 

Based on your description, it seems that there is no custom visual in Power BI that can fully meet your requirements. So I did a test to find something workaround. Is the following result what you want?

v-yuaj-msft_0-1617868916085.png

I just create a stacked chart visual and set the color of "minimum" as white. 

v-yuaj-msft_1-1617869054627.png

v-yuaj-msft_2-1617869079259.png

If you set the maximum and value columns to the same color, this may better meet your needs.

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@Anonymous , I doubt you can do that with standard visual.

check some custom visual

https://appsource.microsoft.com/en-us/marketplace/apps?product=power-bi-visuals

Anonymous
Not applicable

@amitchandak Thanks for replying. I have been checking some custom visuals but I have not found any good fit so far. If you have any recommendations then please let me know. 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.