File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,6 +120,10 @@ def add_molecules(
120120 smiles_col : str | list[str], optional
121121 name of the column in df containing the smiles plotted in fig (default 'SMILES').
122122 If provided as a list, will add a slider to choose which column is used for rendering the structures.
123+ mol_col : Mol | list[Mol], optional
124+ name of the column in df containing RDKit Mol objects of the molecules plotted in fig (default None).
125+ If not None, the structures will be drawn using the coordinates of the Mol objects.
126+ If provided as a list, will add a slider to choose which column is used for rendering the structures.
123127 show_img : bool, optional
124128 whether or not to generate the molecule image in the dash app (default True).
125129 svg_size : float, optional
@@ -296,7 +300,10 @@ def display_hover(hoverData, value):
296300 )
297301
298302 if title_col is not None :
299- title = df_row [title_col ]
303+ title = df_row [title_col ].astype (str )
304+ if title_col in caption_transform :
305+ title = caption_transform [title_col ](title )
306+
300307 if len (title ) > wraplen :
301308 if wrap :
302309 title = textwrap .fill (title , width = wraplen )
You can’t perform that action at this time.
0 commit comments