Skip to content

Instantly share code, notes, and snippets.

@pplante
Last active September 21, 2017 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 9 You must be signed in to fork a gist
  • Save pplante/92169faaf2620458251d to your computer and use it in GitHub Desktop.
Save pplante/92169faaf2620458251d to your computer and use it in GitHub Desktop.

Rentlytics Exercise - Lease Visualizer

Using the dataset below, build a lease history gantt chart. The X-Axis should be time, with the Y-Axis representing unique "unitName" values. On the gantt chart, each lease is represented by a rectangle, in the row corresponding to the unit. The graph should also highlight the month with the highest aggregated rent.

Please fork this CodePen to submit your result, you may use any HTML/CSS/JS preprocessors or framework you wish.

DO NOT USE A CHARTING/GRAPHING LIBRARY (excluding D3).

[
{
"unitName": "A101",
"beginTimestamp": 1328256000000,
"endTimestamp": 1359978400000,
"rent": 1200
},
{
"unitName": "B201",
"beginTimestamp": 1298966400000,
"endTimestamp": 1398966400000,
"rent": 1300
},
{
"unitName": "A301",
"beginTimestamp": 1275721200000,
"endTimestamp": 1298966400000,
"rent": 1500
},
{
"unitName": "A101",
"beginTimestamp": 1298966400000,
"endTimestamp": 1310664000000,
"rent": 1100
},
{
"unitName": "A301",
"beginTimestamp": 1357878400000,
"endTimestamp": 1369878400000,
"rent": 2000
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment