Month: March 2016

Bar Charts in R

Here is a short code snippet for loading an XLSX File, plotting a variable against another and saving everything to a good (i.e. Correct margins) PDF file.

 

Taming a wild autocomplete box (CSS)

I recently had a CSS issue that made me waste a few hours. It involved Angular Bootstrap autocomplete boxes (typeahead) with custom templates for each of the results presented in the list. Here is the final code:

View code (EJS in my case):

 

Custom template code for the autocomplete suggestions. In this case I wanted to show a title and a description under it.

AngularJS Controller code that fetches the suggestions from the API.

Finally we need to fix the CSS, or else your suggestions will not adjust to the size of the search box.

 

Before:

Screen Shot 2016-03-09 at 21.23.58

After:

Screen Shot 2016-03-09 at 21.23.31

 

CSS code that fixes the issue, using the white-space CSS property: