{"action":"opened","issue":{"url":"https://api.github.com/repos/highcharts/highcharts-editor/issues/162","repository_url":"https://api.github.com/repos/highcharts/highcharts-editor","labels_url":"https://api.github.com/repos/highcharts/highcharts-editor/issues/162/labels{/name}","comments_url":"https://api.github.com/repos/highcharts/highcharts-editor/issues/162/comments","events_url":"https://api.github.com/repos/highcharts/highcharts-editor/issues/162/events","html_url":"https://github.com/highcharts/highcharts-editor/issues/162","id":302741487,"number":162,"title":"highed.installTemplate and highed.installMultipleTemplates are undefined","user":{"login":"mikemccaughan","id":1719723,"avatar_url":"https://avatars3.githubusercontent.com/u/1719723?v=4","gravatar_id":"","url":"https://api.github.com/users/mikemccaughan","html_url":"https://github.com/mikemccaughan","followers_url":"https://api.github.com/users/mikemccaughan/followers","following_url":"https://api.github.com/users/mikemccaughan/following{/other_user}","gists_url":"https://api.github.com/users/mikemccaughan/gists{/gist_id}","starred_url":"https://api.github.com/users/mikemccaughan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikemccaughan/subscriptions","organizations_url":"https://api.github.com/users/mikemccaughan/orgs","repos_url":"https://api.github.com/users/mikemccaughan/repos","events_url":"https://api.github.com/users/mikemccaughan/events{/privacy}","received_events_url":"https://api.github.com/users/mikemccaughan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-06T15:17:04Z","updated_at":"2018-03-06T15:17:04Z","closed_at":null,"author_association":"NONE","body":"#### Expected behaviour\r\nTo add a template, I should call `highed.installTemplate(type, definition)` in the following manner:\r\n\r\n```\r\nhighed.installTemplate('custom', {\r\n      title: 'My company template',\r\n      tooltipText: 'Company template: requires no particular data',\r\n      config: {\r\n          'chart--title': 'Company Chart'\r\n      }\r\n});\r\n```\r\n\r\nSimilar expectation for `highed.installMultipleTemplates()`.\r\n\r\n#### Actual behaviour\r\nCalling the function like above results in error:\r\n\r\n> highed.installTemplate is not a function.\r\n\r\nInstead, at least according to the code, one should call:\r\n\r\n```\r\nhighed.templates.add('custom', {\r\n      title: 'My company template',\r\n      tooltipText: 'Company template: requires no particular data',\r\n      config: {\r\n          'chart--title': 'Company Chart'\r\n      }\r\n});\r\n```\r\n\r\nAnd this indeed works. For installMultipleTemplates, addMultiple works.\r\n\r\n#### Reproduction steps\r\nInclude, for example, highcharts-editor.complete.js in an HTML page.\r\n\r\nCall the code shown in the Expected section.\r\n\r\n#### Editor version\r\nv0.2.1-rc2\r\n\r\n#### Affected browser(s)\r\nTested in Chrome v64.0.3282.186 (Official Build) (64-bit), but I expect it happens in all browsers\r\n"}}
{"actor":{"display_login":"mikemccaughan"}}