def getMenuInfo(self, entity, dataHandler):
        if dataHandler is not None:
            # first item in this array will be the default renderer (if no metadata exists)
            infos = [{
                "categoryId": "Table",
                "title": "Table.Next",
                "icon": "fa-table",
                "id": "tableView"
            }, {
                "categoryId": "Chart",
                "title": "Bar Chart",
                "icon": "fa-bar-chart",
                "id": "barChart"
            }, {
                "categoryId": "Chart",
                "title": "Line Chart",
                "icon": "fa-line-chart",
                "id": "lineChart"
            }, {
                "categoryId": "Chart",
                "title": "Scatter Plot",
                "icon": "fa-circle",
                "id": "scatterPlot"
            }, {
                "categoryId": "Chart",
                "title": "Pie Chart",
                "icon": "fa-pie-chart",
                "id": "pieChart"
            }, {
                "categoryId": "Chart",
                "title": "Map",
                "icon": "fa-globe",
                "id": "mapView"
            }, {
                "categoryId": "Chart",
                "title": "Histogram",
                "icon": "fa-area-chart",
                "id": "histogram"
            }]

            infos = [
                info for info in infos if info["id"] in
                PixiedustRenderer.getHandlerIdList(dataHandler.isStreaming)
            ]
            accept = getattr(dataHandler, "accept", lambda id: True)
            if not callable(accept):
                accept = lambda id: True

            return [info for info in infos if accept(info["id"]) is True]

        return []
Exemple #2
0
    def getMenuInfo(self, entity, dataHandler):
        if dataHandler is not None:
            # first item in this array will be the default renderer (if no metadata exists)
            infos = [
                {"categoryId": "Table", "title": "Table.Next", "icon": "fa-table", "id": "tableView"},
                {"categoryId": "Chart", "title": "Bar Chart", "icon": "fa-bar-chart", "id": "barChart"},
                {"categoryId": "Chart", "title": "Line Chart", "icon": "fa-line-chart", "id": "lineChart"},
                {"categoryId": "Chart", "title": "Scatter Plot", "icon": "fa-circle", "id": "scatterPlot"},
                {"categoryId": "Chart", "title": "Pie Chart", "icon": "fa-pie-chart", "id": "pieChart"},
                {"categoryId": "Chart", "title": "Map", "icon": "fa-globe", "id": "mapView"},
                {"categoryId": "Chart", "title": "Histogram", "icon": "fa-area-chart", "id": "histogram"}
            ]

            infos = [info for info in infos if info["id"] in PixiedustRenderer.getHandlerIdList(dataHandler.isStreaming)]
            accept = getattr(dataHandler, "accept", lambda id: True)
            if not callable(accept):
                accept = lambda id:True
            
            return [info for info in infos if accept(info["id"]) is True]

        return []
Exemple #3
0
 def getRendererList(self):
     return PixiedustRenderer.getRendererList(self.options, self.entity,
                                              self.isStreaming)
Exemple #4
0
 def newDisplayHandler(self, options, entity, dataHandler):
     return PixiedustRenderer.getRenderer(options, entity,
                                          dataHandler.isStreaming)
Exemple #5
0
 def getRendererList(self):
     return PixiedustRenderer.getRendererList(self.options, self.entity)
Exemple #6
0
 def newDisplayHandler(self, options, entity):
     return PixiedustRenderer.getRenderer(options, entity)
Exemple #7
0
 def get_renderer(self):
     return PixiedustRenderer.getRenderer(
         self.parsed_command['kwargs'], self.parent_entity,
         False) if self.parent_entity is not None else None
 def get_renderer(self):
     return PixiedustRenderer.getRenderer(
         self.parsed_command['kwargs'],
         self.parent_entity, False
     ) if self.parent_entity is not None else None
Exemple #9
0
 def newDisplayHandler(self, options, entity, dataHandler):
     return PixiedustRenderer.getRenderer(options, entity, dataHandler.isStreaming)
 def getRendererList(self):
     return PixiedustRenderer.getRendererList(self.options, self.entity, self.isStreaming)