Html component in dash_table_experiments


#1

I am happily using dash_table_experiments. I want now to make the contents of one cell a html link.
I found this, looks like the right answer:

however - when I try to run simply the example given - I get an ‘Error loading layout’ message with zero useful error messages
How can I start to debug this?
Maybe there is a new, easier way to put a basic html link in a dash-table-experiments cell?

the example:

import dash
from dash.dependencies import Input, Output, State
import dash_core_components as dcc
import dash_html_components as html
import dash_table_experiments as dt
import json
import pandas as pd
import numpy as np
import plotly

app = dash.Dash()
server = app.server

app.scripts.config.serve_locally = True
app.css.config.serve_locally = True

DF_GAPMINDER = pd.read_csv(
    'https://raw.githubusercontent.com/plotly/datasets/master/gapminderDataFiveYear.csv'
)

ROW_HEIGHT = 40

sparklines = {
    c: html.Div(style={'height': 100, 'width': '100%'}, children=dcc.Graph(
        id=c,
        figure={
            'data': [{
                'x': DF_GAPMINDER[c],
                'type': 'histogram',
            }],
            'layout': {
                'height': ROW_HEIGHT,
                'margin': {
                    'l': 0, 'r': 0, 't': 0, 'b': 0
                },
                'xaxis': {
                    'showticklabels': False,
                    'showline': False,
                    'showgrid': False,
                },
                'yaxis': {
                    'showticklabels': False,
                    'showline': False,
                    'showgrid': False,
                },
                'hovermode': 'closest'
            }
        },
        config={'displayModeBar': False}
    ))
    for c in DF_GAPMINDER.columns
}

ROWS = [sparklines] + DF_GAPMINDER.to_dict('records')

app.layout = html.Div([
    dt.DataTable(
        rows=ROWS,

        row_selectable=True,
        filterable=True,
        sortable=True,
        selected_row_indices=[],
        id='datatable',

        row_height=ROW_HEIGHT
    ),
    html.Div(id='selected-indexes'),
    dcc.Graph(
        id='graph-gapminder'
    ),
], className="container")


app.css.append_css({
    "external_url": "https://codepen.io/chriddyp/pen/bWLwgP.css"
})

if __name__ == '__main__':
    app.run_server(debug=True)

#2

Hey @ivremos

Have you tried checking your versioning? i.e. https://github.com/plotly/dash-table-experiments/pull/11#issuecomment-396231739