Combined Line and Area chart in R

Super User
2610 Views
Highlighted
Super User
Posts: 1,662
Registered: ‎12-15-2015

Combined Line and Area chart in R

Description

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

ggplot2

reshape2

scales

 

Tested on

MRO 3.3.1, CRAN 3.3.1

Attachment