Beispiel #1
0
 def test_au_e_enc_full(self):
     g = graphistry.bind(source='s',
                         destination='d',
                         edge_color='c',
                         edge_title='t',
                         edge_label='l',
                         edge_weight='w',
                         edge_opacity='o',
                         edge_icon='i',
                         edge_size='s',
                         edge_source_color='sc',
                         edge_destination_color='dc')
     au = ArrowUploader()
     assert au.g_to_edge_encodings(g) == \
         {
             'source': 's',
             'destination': 'd',
             'edge_color': 'c',
             'edge_title': 't',
             'edge_label': 'l',
             'edge_weight': 'w',
             'edge_opacity': 'o',
             'edge_icon': 'i',
             'edge_size': 's',
             'edge_source_color': 'sc',
             'edge_destination_color': 'dc'
         }
 def test_au_e_enc_full(self):        
     g = graphistry.bind(source='s', destination='d',
         edge_color='c', edge_title='t', edge_label='l', edge_weight='w',
         edge_opacity='o', edge_icon='i', edge_size='s', edge_source_color='sc', edge_destination_color='dc')
     g = g.encode_edge_color('c', ["green"], as_categorical=True)
     au = ArrowUploader()
     assert au.g_to_edge_encodings(g) == {
         'bindings': {
             'source': 's',
             'destination': 'd',
             'edge_color': 'c',
             'edge_title': 't',
             'edge_label': 'l',
             'edge_weight': 'w',
             'edge_opacity': 'o',
             'edge_icon': 'i',
             'edge_size': 's',
             'edge_source_color': 'sc',
             'edge_destination_color': 'dc'
         },
         'complex': {
             'default': {
                 'edgeColorEncoding': {
                     'graphType': 'edge',
                     'encodingType': 'color',
                     'attribute': 'c',
                     'variation': 'categorical',
                     'colors': ['green']
                 }
             }
         }
     }
Beispiel #3
0
 def test_au_e_enc_mt(self):
     g = graphistry.bind()
     au = ArrowUploader()
     assert au.g_to_edge_encodings(g) == {'bindings': {}}