{"action":"closed","issue":{"url":"https://api.github.com/repos/splunk/splunk-sdk-javascript/issues/25","labels_url":"https://api.github.com/repos/splunk/splunk-sdk-javascript/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/splunk/splunk-sdk-javascript/issues/25/comments","events_url":"https://api.github.com/repos/splunk/splunk-sdk-javascript/issues/25/events","html_url":"https://github.com/splunk/splunk-sdk-javascript/issues/25","id":18220243,"number":25,"title":"Highchart v2.1.7 in the SDK. Fail to load splunk.ui.charting.js if v3 highchart is used in web project","user":{"login":"jovezhong","id":5076438,"avatar_url":"https://avatars.githubusercontent.com/u/5076438?v=3","gravatar_id":"","url":"https://api.github.com/users/jovezhong","html_url":"https://github.com/jovezhong","followers_url":"https://api.github.com/users/jovezhong/followers","following_url":"https://api.github.com/users/jovezhong/following{/other_user}","gists_url":"https://api.github.com/users/jovezhong/gists{/gist_id}","starred_url":"https://api.github.com/users/jovezhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jovezhong/subscriptions","organizations_url":"https://api.github.com/users/jovezhong/orgs","repos_url":"https://api.github.com/users/jovezhong/repos","events_url":"https://api.github.com/users/jovezhong/events{/privacy}","received_events_url":"https://api.github.com/users/jovezhong/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2013-08-19T02:22:07Z","updated_at":"2015-03-19T20:43:09Z","closed_at":"2015-03-19T20:43:09Z","body":"I am using the latest master branch of Splunk JavaScript SDK, together with Highchart v3 in a PhoneGap project. But the splunk.ui.charting.js failed to be loaded.\r\n\r\nsplunk.ui.charting.js line 13041 \r\n\r\n     dataLabels: merge(defaultLabelOptions, {\r\n\r\n\"Uncaught TypeError: undefined is not a function\"\r\n\r\nIt turns to be something related to HighchartsAdapter. The highchart in JS SDK (v2.1.7) doesn't define any HighchartsAdapter in window object, but the high chart.js in my PhoneGap project (v3.0.2) has such global variable defined.\r\n\r\nThere are 2 quick and dirty solutions to fix this.\r\n\r\n1. set globalAdapter=null, as if there is no window.HighchartsAdapter defined.\r\n2. just to redefine the merge function. Change line 12066 of splunk.ui.charting.js\r\n\r\n          line:12066: \t//merge = adapter.merge,\r\n          merge = function () {\r\n          var args = arguments;\r\n          return jQuery.extend(true, null, args[0], args[1], args[2],args[3]);\r\n          },\r\n\r\n\r\nBy doing so, the script can be loaded and executed correctly and all charts show up.\r\n\r\nHowever, it will be great if we can fix the SDK code to sandbox the embed HighCharts, or simply upgrade the HighChart to v3."}}