How to use the beakerx.beakerx.plot.chart.GraphicsActionObject function in beakerx

To help you get started, we’ve selected a few beakerx examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github twosigma / beakerx / beakerx / beakerx / plot / chart.py View on Github external
def _on_action_details(self, msg):
        params = msg['content']['data']['content']
        graphics_object = None
        for item in self.chart.graphics_list:
            if item.uid == params['itemId']:
                graphics_object = item
        action_type = params['params']['actionType']
        if action_type == 'onclick' or action_type == 'onkey':
            self.details = GraphicsActionObject(graphics_object, params['params'])
            arguments = dict(target_name='beakerx.tag.run')
            comm = Comm(**arguments)
            msg = {'runByTag': params['params']['tag']}
            state = {'state': msg}
            comm.send(data=state, buffers=[])
github twosigma / beakerx / beakerx / beakerx / plot / chart.py View on Github external
def _handle_msg(self, msg):
        if 'content' in msg['content']['data']:
            params = msg['content']['data']['content']
            graphics_object = None
            for item in self.chart.graphics_list:
                if item.uid == params['itemId']:
                    graphics_object = item
            self.details = GraphicsActionObject(graphics_object, params['params'])
            if params['event'] == 'onclick':
                self._on_click_action(msg)
            elif params['event'] == 'onkey':
                self._on_key_action(msg)
            elif params['event'] == 'actiondetails':
                self._on_action_details(msg)
github twosigma / beakerx / beakerx / beakerx / plot / chart.py View on Github external
def __init__(self, **kwargs):
        super(Plot, self).__init__(**kwargs)
        self.chart = XYChart(**kwargs)
        self.model = self.chart.transform()
        self.on_msg(self._handle_msg)
        self.details = GraphicsActionObject(None, {})
github twosigma / beakerx / beakerx / beakerx / plot / chart.py View on Github external
def _handle_msg(self, msg):
        params = msg['content']['data']['content']
        graphics_object = None
        for item in self.chart.graphics_list:
            if item.uid == params['itemId']:
                graphics_object = item
        self.details = GraphicsActionObject(graphics_object, params['params'])
        if params['event'] == 'onclick':
            self._on_click_action(msg)
        elif params['event'] == 'onkey':
            self._on_key_action(msg)
        elif params['event'] == 'actiondetails':
            self._on_action_details(msg)
github twosigma / beakerx / beakerx / beakerx / plot / chart.py View on Github external
def _on_action_details(self, msg):
        params = msg['content']['data']['content']
        graphics_object = None
        for item in self.chart.graphics_list:
            if item.uid == params['itemId']:
                graphics_object = item
        action_type = params['params']['actionType']
        if action_type == 'onclick' or action_type == 'onkey':
            self.details = GraphicsActionObject(graphics_object, params['params'])
            arguments = dict(target_name='beakerx.tag.run')
            comm = Comm(**arguments)
            msg = {'runByTag': params['params']['tag']}
            state = {'state': msg}
            comm.send(data=state, buffers=[])
github twosigma / beakerx / beakerx / beakerx / plot / chart.py View on Github external
def __init__(self, **kwargs):
        super(Plot, self).__init__()
        self.chart = XYChart(**kwargs)
        self.model = self.chart.transform()
        self.on_msg(self._handle_msg)
        self.details = GraphicsActionObject(None, {})