{"action":"created","issue":{"url":"https://api.github.com/repos/ghtmtt/DataPlotly/issues/76","repository_url":"https://api.github.com/repos/ghtmtt/DataPlotly","labels_url":"https://api.github.com/repos/ghtmtt/DataPlotly/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/ghtmtt/DataPlotly/issues/76/comments","events_url":"https://api.github.com/repos/ghtmtt/DataPlotly/issues/76/events","html_url":"https://github.com/ghtmtt/DataPlotly/issues/76","id":309251833,"node_id":"MDU6SXNzdWUzMDkyNTE4MzM=","number":76,"title":"Add DataPlotly to Layout Composer","user":{"login":"ghtmtt","id":2884884,"node_id":"MDQ6VXNlcjI4ODQ4ODQ=","avatar_url":"https://avatars2.githubusercontent.com/u/2884884?v=4","gravatar_id":"","url":"https://api.github.com/users/ghtmtt","html_url":"https://github.com/ghtmtt","followers_url":"https://api.github.com/users/ghtmtt/followers","following_url":"https://api.github.com/users/ghtmtt/following{/other_user}","gists_url":"https://api.github.com/users/ghtmtt/gists{/gist_id}","starred_url":"https://api.github.com/users/ghtmtt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghtmtt/subscriptions","organizations_url":"https://api.github.com/users/ghtmtt/orgs","repos_url":"https://api.github.com/users/ghtmtt/repos","events_url":"https://api.github.com/users/ghtmtt/events{/privacy}","received_events_url":"https://api.github.com/users/ghtmtt/received_events","type":"User","site_admin":false},"labels":[{"id":564433642,"node_id":"MDU6TGFiZWw1NjQ0MzM2NDI=","url":"https://api.github.com/repos/ghtmtt/DataPlotly/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-28T07:33:10Z","updated_at":"2018-11-07T15:11:15Z","closed_at":null,"author_association":"OWNER","body":"These would be a huge step forward, but difficult to implement. Some ideas:\r\n\r\n1. a button like the currents ``Add shape`` where the user can drag a rectangle for the plot area\r\n2. reuse the existing widget (or some parts of it) and put a dock window like the atlas one\r\n3. generate an image (static else a webbrowser is needed and is nonesense in this case) with the plot type and all the parameters\r\n4. would be great to have plot(s) updated depending on atlas features (maybe related to #75 that 's, filtering the plot depending on the mapcanvas returned by the atlas)\r\n\r\na prototype of @nyalldawson (so much thanks for this)\r\n\r\n```python\r\nclass MyItemType(QgsLayoutItem):\r\n    \r\n    def __init__(self, layout):\r\n        super().__init__(layout)\r\n        \r\n    def draw(self, layout_render_context):\r\n        qpainter = layout_render_context.renderContext().painter()\r\n        # draw using qpainter\r\n        # render using QWebPage\r\n        \r\n\r\nclass my_item_metadata(QgsLayoutItemAbstractMetadata):\r\n    \r\n    def __init__(self):\r\n        super().__init__(QgsLayoutItemRegistry.PluginItem + 46647, 'my awesome item')\r\n    \r\n    def createItem(self, layout):\r\n        return MyItemType(layout)\r\n        \r\n\r\nclass my_item_gui_metadata(QgsLayoutItemAbstractGuiMetadata):\r\n    \r\n    def __init__(self):\r\n        super().__init__(QgsLayoutItemRegistry.PluginItem + 46647, 'my awesome item')\r\n    \r\n    def creationIcon(self):\r\n        return QIcon('asdasdasdas.svg')\r\n        \r\n    def createItemWidget(self, item):\r\n        # must render your item's config widget\r\n        return MyItemConfigWidget(item)\r\n        \r\n        \r\nQgsApplication.layoutItemRegistry().addLayoutItemType(my_item_metadata())\r\nQgsGui.layoutItemGuiRegistry().addLayoutItemGuiMetadata(my_item_gui_metadata())\r\n```"},"comment":{"url":"https://api.github.com/repos/ghtmtt/DataPlotly/issues/comments/436655848","html_url":"https://github.com/ghtmtt/DataPlotly/issues/76#issuecomment-436655848","issue_url":"https://api.github.com/repos/ghtmtt/DataPlotly/issues/76","id":436655848,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjY1NTg0OA==","user":{"login":"anitagraser","id":590385,"node_id":"MDQ6VXNlcjU5MDM4NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/590385?v=4","gravatar_id":"","url":"https://api.github.com/users/anitagraser","html_url":"https://github.com/anitagraser","followers_url":"https://api.github.com/users/anitagraser/followers","following_url":"https://api.github.com/users/anitagraser/following{/other_user}","gists_url":"https://api.github.com/users/anitagraser/gists{/gist_id}","starred_url":"https://api.github.com/users/anitagraser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anitagraser/subscriptions","organizations_url":"https://api.github.com/users/anitagraser/orgs","repos_url":"https://api.github.com/users/anitagraser/repos","events_url":"https://api.github.com/users/anitagraser/events{/privacy}","received_events_url":"https://api.github.com/users/anitagraser/received_events","type":"User","site_admin":false},"created_at":"2018-11-07T15:11:15Z","updated_at":"2018-11-07T15:11:15Z","author_association":"NONE","body":"I've successfully used the HTML code from DataPlotly in an HTML item. "}}
{"actor":{"display_login":"anitagraser"}}