{"action":"created","issue":{"url":"https://api.github.com/repos/enthought/chaco/issues/312","repository_url":"https://api.github.com/repos/enthought/chaco","labels_url":"https://api.github.com/repos/enthought/chaco/issues/312/labels{/name}","comments_url":"https://api.github.com/repos/enthought/chaco/issues/312/comments","events_url":"https://api.github.com/repos/enthought/chaco/issues/312/events","html_url":"https://github.com/enthought/chaco/issues/312","id":177714253,"number":312,"title":"scrollbar does not work in recent chaco releases","user":{"login":"sancelot","id":122811,"avatar_url":"https://avatars.githubusercontent.com/u/122811?v=3","gravatar_id":"","url":"https://api.github.com/users/sancelot","html_url":"https://github.com/sancelot","followers_url":"https://api.github.com/users/sancelot/followers","following_url":"https://api.github.com/users/sancelot/following{/other_user}","gists_url":"https://api.github.com/users/sancelot/gists{/gist_id}","starred_url":"https://api.github.com/users/sancelot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sancelot/subscriptions","organizations_url":"https://api.github.com/users/sancelot/orgs","repos_url":"https://api.github.com/users/sancelot/repos","events_url":"https://api.github.com/users/sancelot/events{/privacy}","received_events_url":"https://api.github.com/users/sancelot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-09-19T06:49:52Z","updated_at":"2016-09-22T13:07:43Z","closed_at":null,"body":"This program was running fine in chaco 3.2, but with chaco 4, scrollbar does not show at all.\r\n\r\nI would like either to find the problem or find a workaround.\r\n\r\nPanTool may be a workaround, but this will conflict with some linecursors used with mouse.\r\n\r\n ```\r\n #!/usr/bin/env python\r\n# Major library imports\r\nfrom numpy import linspace\r\n\r\nfrom scipy.special import jn\r\n\r\n# Enthought library imports\r\nfrom enthought.enable.api import Component, ComponentEditor\r\nfrom enthought.traits.api import HasTraits, Instance\r\nfrom enthought.traits.ui.api import Item, Group, View\r\n\r\n# Chaco imports\r\nfrom enthought.chaco.api import ArrayPlotData, VPlotContainer, \\\r\n    Plot, OverlayPlotContainer, add_default_axes, add_default_grids\r\nfrom enthought.chaco.plotscrollbar import PlotScrollBar\r\nfrom enthought.chaco.tools.api import PanTool, ZoomTool\r\n\r\n#===============================================================================\r\n# # Create the Chaco plot.\r\n#===============================================================================\r\ndef _create_plot_component():\r\n    # Create some x-y data series to plot\r\n    x = linspace(-2.0, 10.0, 100)\r\n    pd = ArrayPlotData(index = x)\r\n    for i in range(5):\r\n        pd.set_data(\"y\" + str(i), jn(i,x))\r\n\r\n    # Create some line plots of some of the data\r\n    plot1 = Plot(pd)\r\n    plot1.plot((\"index\", \"y0\", \"y1\", \"y2\"), name=\"j_n, n<3\", color=\"red\")[0]\r\n    p = plot1.plot((\"index\", \"y3\"), name=\"j_3\", color=\"blue\")[0]\r\n\r\n    # Add the scrollbar\r\n    plot1.padding_top = 0\r\n\r\n    p.index_range.high_setting = 1\r\n    # Create a container and add our plots\r\n    container = OverlayPlotContainer(padding = 5,fill_padding = True,\r\n                                     bgcolor = \"lightgray\", use_backbuffer=True)\r\n    hscrollbar = PlotScrollBar(component=p, mapper=p.index_mapper,axis=\"index\", resizable=\"\",use_backbuffer = False,\r\n                               height=15,position=(0,0))\r\n    hscrollbar.force_data_update()\r\n\r\n    plot1.overlays.append(hscrollbar)\r\n\r\n\r\n    hgrid,vgrid = add_default_grids(plot1)\r\n    add_default_axes(plot1)\r\n    container.add(plot1)\r\n\r\n    container.invalidate_and_redraw()\r\n    return container\r\n\r\n#===============================================================================\r\n# Attributes to use for the plot view.\r\nsize=(900,500)\r\ntitle=\"Scrollbar example\"\r\n\r\n#===============================================================================\r\n# # Demo class that is used by the demo.py application.\r\n#===============================================================================\r\nclass Demo(HasTraits):\r\n    plot = Instance(Component)\r\n\r\n    traits_view = View(\r\n                    Group(\r\n                        Item('plot', editor=ComponentEditor(size=size),\r\n                             show_label=False),\r\n                        orientation = \"vertical\"),\r\n                    resizable=True, title=title\r\n                    )\r\n\r\n    def _plot_default(self):\r\n         return _create_plot_component()\r\n\r\ndemo = Demo()\r\n\r\nif __name__ == \"__main__\":\r\n    demo.configure_traits()\r\n```"},"comment":{"url":"https://api.github.com/repos/enthought/chaco/issues/comments/248898340","html_url":"https://github.com/enthought/chaco/issues/312#issuecomment-248898340","issue_url":"https://api.github.com/repos/enthought/chaco/issues/312","id":248898340,"user":{"login":"sancelot","id":122811,"avatar_url":"https://avatars.githubusercontent.com/u/122811?v=3","gravatar_id":"","url":"https://api.github.com/users/sancelot","html_url":"https://github.com/sancelot","followers_url":"https://api.github.com/users/sancelot/followers","following_url":"https://api.github.com/users/sancelot/following{/other_user}","gists_url":"https://api.github.com/users/sancelot/gists{/gist_id}","starred_url":"https://api.github.com/users/sancelot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sancelot/subscriptions","organizations_url":"https://api.github.com/users/sancelot/orgs","repos_url":"https://api.github.com/users/sancelot/repos","events_url":"https://api.github.com/users/sancelot/events{/privacy}","received_events_url":"https://api.github.com/users/sancelot/received_events","type":"User","site_admin":false},"created_at":"2016-09-22T13:07:43Z","updated_at":"2016-09-22T13:07:43Z","body":"regarding usage of Pan and LineInspector : \r\n\r\nI am using 2 Draggable LineInspectors. this Draggable LineInspector behaves not correctly, because it can not catch left up event , when pan is active....\r\n\r\nApplication is dedicated to touchscreen interface too, so I can not use other buttons .\r\n"}}
{"actor":{"display_login":"sancelot"}}