Combined Line and Area chart in R

Super User
Super User
Super User

Combined Line and Area chart in R


This visual uses ggplot2, reshape2 and scales packages to draw two lines, color them and color area between two lines. Using sample price data for cities of Melbourne and Sydney this visual provides easy way to plot two variables over time series making it easy to compare and analyse.


Prerequisites (The sample .pbix files won't work without installing the following)

1. Install R Engine

Power BI does not include the R engine.  Therefore, a seperate installation is required to install R on your local computer.  


Required R Packages





Tested on

MRO 3.3.1, CRAN 3.3.1