Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

bundle on master isn't up-to-date? #377

Closed
chriddyp opened this issue Nov 8, 2018 · 3 comments
Closed

bundle on master isn't up-to-date? #377

chriddyp opened this issue Nov 8, 2018 · 3 comments

Comments

@chriddyp
Copy link
Member

chriddyp commented Nov 8, 2018

I just ran a simple example from the root of the directory and the dropdown css isn't coming through. There have been a few PRs that have updated the dropdown component in the last couple of days by @valentijnnieman and @wbrgss , so I suspect that the bundles weren't regenerated or committed to the repo.

import dash
from dash.dependencies import Input, Output
import dash_core_components as dcc
import dash_html_components as html
import pandas as pd
import plotly.graph_objs as go

app = dash.Dash(__name__)
app.scripts.config.serve_locally = True
app.css.config.serve_locally = True

app.layout = html.Div([
    dcc.Dropdown(
        id='color',
        options=[{'label': i, 'value': i} for i in [
            {'label': 'Navy', 'value': '#001f3f'},
            {'label': 'Blue', 'value': '#0074D9'},
            {'label': 'Aqua', 'value': '#7FDBFF'},
            {'label': 'TEAL', 'value': '#39CCCC'},
            {'label': 'OLIVE', 'value': '#3D9970'},
            {'label': 'GREEN', 'value': '#2ECC40'}
        ]],
        value='#2ECC40'
    ),
    dcc.Graph(id='graph'),
])


@app.callback(Output('graph', 'figure'), [Input('color', 'value')])
def update_graph(color):
    return {
        'data': [{
            'x': [
                1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
                2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
            ],
            'y': [
                219, 146, 112, 127, 124, 180, 236, 207, 236, 263,
                350, 430, 474, 526, 488, 537, 500, 439
            ],
            'type': 'bar',
            'marker': {'color': color}
        }],
        'layout': {
            'transition': {
                'duration': 500
            }
        }
    }


if __name__ == '__main__':
    app.run_server(debug=True)
@chriddyp
Copy link
Member Author

chriddyp commented Nov 8, 2018

I ran into this in #374, where I'm simply updating the version of plotly.js. I've published prerelease versions and the dropdown CSS isn't coming through. My code doesn't actually change any of the JS files, so I didn't need to rebuild the files, I'm depending on the bundles that exist on master.

@chriddyp
Copy link
Member Author

chriddyp commented Nov 8, 2018

capture d ecran 2018-11-08 a 18 15 40

@chriddyp
Copy link
Member Author

chriddyp commented Nov 8, 2018

🙈 sorry long day, there's a typo in my code

@chriddyp chriddyp closed this as completed Nov 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant