css - jupyter declarativewidgets change style -


in jupyter notebook, want have interactive table, when user selects row, show relevant values in table or graph.

what trying use declarativewidgets (although if easier alternative presented, glad)

i had no problem setting example worked fine, , trivial link event 1 item next, have been unable change styling of elements. in particular, want able control background color (and make alternate row) on table table basis. mean, have several tables (the first linked next, linked next, etc.), , want each table have different background color.

what have far:

from ipython.display import display, image ipython.core.display import html ipywidgets import * import declarativewidgets import pandas pd declarativewidgets.init() 

then import urth-viz-table:

%%html <link rel="import" href="urth_components/urth-viz-table/urth-viz-table.html"      is='urth-core-import'> 

then have function

def create_df():     return pd.dataframe({'one' : pd.series([1., 2., 3.], index=['a', 'b', 'c']),            'two' : pd.series([1., 2., 3., 4.], index=['a', 'b', 'c', 'd'])}) 

and next cell creates first table:

%%html <template is="urth-core-bind">     <urth-core-function ref="create_df"                     result="{{create_df}}"                      limit="1600"                     delay="100"                      auto>     </urth-core-function>     <urth-viz-table datarows="{{ create_df.data }}"                  rows-visible="19"                  selection="{{first_selection}}"                  columns="{{ create_df.columns }}"                  selection-as-object>     </urth-viz-table> </template> 

this works fine, , able create new tables , graphs , link them behaviour of previous table. have not been able change of styling of table, specific example appreciated.

i using python 3.6 jupyter 4.2.1 jupyter-dashboards 0.6.1 jupyter-declarativewidgets 0.7.0


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -