fixed apapter chart title
changed code to support requirejs