Exemple #1
0
 def render(self):
     style_plot = {
         'position': 'relative',
         'border': 'solid 1px black',
         'background-color': 'white',
         'left': '10px',
         'bottom': '10px',
         'width': '{}px'.format(self._size_plot[0]),
         'height': '{}px'.format(self._size_plot[1])
     }
     style1 = {
         'width': '{}px'.format(self._size[0]),
         'height': '{}px'.format(self._size[1])
     }
     if self._selected:
         style1['background-color'] = 'rgb(240,240,200)'
         style1['border'] = 'solid 1px gray'
         if self._current:
             style1['background-color'] = 'rgb(220,220,180)'
     if self._current:
         style1['border'] = 'solid 2px rgb(150,50,50)'
     return vd.div(vd.p('Unit {}'.format(self._unit_id),
                        style={'text-align': 'center'}),
                   vd.div(self._plot, style=style_plot, size=()),
                   style=style1)
Exemple #2
0
 def render(self):
     style0 = {'border': 'solid 1px black', 'margin': '5px'}
     style1 = {}
     # if self._selected:
     #    style1['background-color']='yellow'
     return vd.div(vd.p('Title'),
                   vd.div(self._plot_div, style=style0),
                   style=style1)
Exemple #3
0
 def render(self):
     style0 = {'border': 'solid 1px black', 'margin': '5px'}
     style1 = {}
     if self._selected:
         style1['background-color'] = 'yellow'
     return vd.div(vd.p('Unit {}'.format(self._unit_id),
                        style={'text-align': 'center'}),
                   vd.div(self._plot_div, style=style0),
                   style=style1)
 def render(self):
     style0 = {'border': 'solid 1px black', 'margin': '5px'}
     style1 = {}
     if self._selected:
         style1['background-color'] = 'yellow'
     if self._unit1_id == self._unit2_id:
         title0 = 'Unit {}'.format(self._unit1_id)
     else:
         title0 = '{} / {}'.format(self._unit1_id, self._unit2_id)
     return vd.div(vd.p(title0, style={'text-align': 'center'}),
                   vd.div(self._plot_div, style=style0),
                   style=style1)