in Education by
I have the following data-frame: -- dcc.Dropdown for selecting the issue goes here on the page -- Job Tenure Location Topic CSM 3-5 England Budget cuts CSM 6-10 Scotland Budget cuts SA 0-2 India Time consuming demands SA 3-5 England Lack of oversight SA 6-10 Germany Lack of support MIA 11-15 India Lack of support ADCS 20+ England Bureaucracy MIA 16-20 Ireland Bureaucracy ADCS 20+ USA Budget cuts The final outcome needs to have three sets of charts. Each set consisting of two bar charts that are stacked and side by side. Here's what the outcome would look like: Graph one consisting of two bars side by side: bar 1 = stacked jobs (height=9, stack consists of 2xCSM, 3xSA, 2xMIA, 2xADCS) bar2 = breakdown of issue by role. e.g. if the issue "budget cuts" is selected in the dropdown, this graph will be height=3, stack consists of 2xCSM, 1xADCS. Bar 2 needs to update when you select an issue from the drop-down. So if I now select issue 'Lack of oversight', bar 2 will have a height of 1 stacked by job 1 x SA. Graphs 2 and 3 will be the same as above but for Tenure and Location respectively instead of job. So the stacks will be Tenure/Location in all instances where it was Job in the above instance. To be honest even if someone can show me how to do the first chart I may be able to replicate the code for chart 2 and 3. I hope this makes sense. Here is the output I get. I basically want these two bars on the same axis not separate like here (ignore height values as my df is larger than what I gave here). Thanks guys. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Here is a simple working example, adapted from import dash import dash_core_components as dcc import dash_html_components as html external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] app = dash.Dash(__name__, external_stylesheets=external_stylesheets) app.layout = html.Div(children=[ html.H1(children='Hello Dash'), html.Div(children=''' Dash: A web application framework for Python. '''), dcc.Graph( id='example-graph', figure={ 'data': [ {'x': [1, 2, 3], 'y': [4, 1, 2], 'type': 'bar', 'name': 'SF'}, {'x': [1, 2, 3], 'y': [2, 4, 5], 'type': 'bar', 'name': u'Montréal'}, {'x': [1, 2, 3], 'y': [5, 2, 6], 'type': 'bar', 'name': 'SF', 'xaxis': 'x2',}, {'x': [1, 2, 3], 'y': [4, 1, 2], 'type': 'bar', 'name': u'Montréal', 'yaxis': 'y2',}, ], 'layout': { 'title': 'Dash Data Visualization', 'xaxis': {'domain':[0, 0.5]}, 'xaxis2': {'domain':[0.6, 1]}, 'yaxis2': {'anchor': 'x2'} } } ) ]) if __name__ == '__main__': app.run_server(debug=True) It should output something like,

Related questions

0 votes
    When I run my Dash app from the command line using export PYTHONPATH=./src/ && python ./src/pdv/ ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 6, 2022 in Education by JackTerrance
0 votes
    What is a Stacked Bar chart in Tableau?...
asked Nov 1, 2020 in Technology by JackTerrance
0 votes
    I have a legit situation like this where I need to implement a method that changes the incoming object ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    I want to log the user session. Currently the code is as follows (setting formatter and handlers is omitted ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 11, 2022 in Education by JackTerrance
0 votes
    I want to log the user session. Currently the code is as follows (setting formatter and handlers is omitted ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 30, 2022 in Education by JackTerrance
0 votes
    I want to log the user session. Currently the code is as follows (setting formatter and handlers is omitted ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 23, 2022 in Education by JackTerrance
0 votes
    I want to log the user session. Currently the code is as follows (setting formatter and handlers is omitted ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 12, 2022 in Education by JackTerrance
0 votes
    I am reading a yaml file like so in Python3: def get_file(): file_name = "file.yml" properties_stream ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 1, 2022 in Education by JackTerrance
0 votes
    This question already has answers here: How are lambdas useful? [closed] (26 answers) Closed 3 years ago ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 15, 2022 in Education by JackTerrance
0 votes
    This question already has answers here: How are lambdas useful? [closed] (26 answers) Closed 3 years ago ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 14, 2022 in Education by JackTerrance
0 votes
    This question already has answers here: How are lambdas useful? [closed] (26 answers) Closed 3 years ago ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 13, 2022 in Education by JackTerrance
0 votes
    I'm Running Ubuntu 16.04 LTS with Python 3.6.8 and I have the following code that allows me to ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 8, 2022 in Education by JackTerrance
0 votes
    Good day to you, Today I was moving code from threading to multiprocess. Everything seemed okay, until I ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    I have a dictionary d full of a collection of dataframes: key type size value gm1 dataframe mxn .. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    i want to create a new layer using scapy,i created a new layer but when i sent it to another ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 23, 2022 in Education by JackTerrance
...