cancel
Showing results for 
Search instead for 
Did you mean: 
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 I
Resolver I

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



New Power BI Features
Datamarts: https://youtu.be/8tskWsJTEpg
Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin !! Proud to be a Super User!
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
!! Subscribe to my youtube Channel !!
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. 

@Anonymous , check if this one can help

https://blog.pragmaticworks.com/power-bi-custom-visuals-chartaccent-linechart



New Power BI Features
Datamarts: https://youtu.be/8tskWsJTEpg
Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin !! Proud to be a Super User!
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
!! Subscribe to my youtube Channel !!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors