Comments (8)
Hi @DavidLloydNGP,
thank you for bringing up the issue! I'm sure other readers were also wondering about the discrepancies between the blog and the .py file.
The app.py file should now work as intended and display the same results as shown in the screenshot of the blog.
I also made an update to import statements deprecated since dash v2.0. These changes, along with a different configuration of the Layout, are not (yet) included in the blog. Hopefully, I can find some time to make a larger update to the blog.
Thank you & have a great day!
Alex
from blog.
I will have a look in the next days.
from blog.
It was just named incorrectly. I changed the name. Hope this helps you @DavidLloydNGP. If not, let me know.
from blog.
And for completeness, this is the folder for the blog post's example:
https://github.com/STATWORX/blog/tree/master/DashApp
from blog.
Thanks for the quick reply.
Perhaps if I gave a concrete example my point would have been clearer.
On the blog post, the 'Layout' function has the following parameters:
'layout':
go.Layout( colorway=["#5E0DAC", '#FF4F00', '#375CB1', '#FF7400', '#FFF400', '#FF0056'], template='plotly_dark', paper_bgcolor='rgba(0, 0, 0, 0)', plot_bgcolor='rgba(0, 0, 0, 0)', margin={'t': 50}, height=250, hovermode='x', autosize=True, title={'text': 'Daily Change', 'font': {'color': 'white'}, 'x': 0.5}, xaxis={'showticklabels': False, 'range': [df_sub.index.min(), df_sub.index.max()]}, )
On github, the same function has different parameter values:
go.Layout( colorway=["#5E0DAC", '#FF4F00', '#375CB1', '#FF7400', '#FFF400', '#FF0056'], template='plotly_dark', paper_bgcolor='rgba(0, 0, 0, 0)', plot_bgcolor='rgba(0, 0, 0, 0)', margin={'b': 15}, hovermode='x', autosize=True, title={'text': 'Stock Prices', 'font': {'color': 'white'}, 'x': 0.5}, xaxis={'range': [df_sub.index.min(), df_sub.index.max()]}, )
Apologies if this seems needlessly pedantic. I am just starting out with Dash, and my dashboard doesn't look like the one in your blogpost, so I am keen to learn why. I think there may be other differences as well, which lead me to believe that the github file may be an older version of the code quoted in the blogpost.
Edit: it looks like the blog post has two plots: 'timeseries' and 'change' whereas the github code only has 'timeseries', hence the difference.
from blog.
Ah ok. I will get in touch with the author and let him know :)
from blog.
Thank you. Apologies for the long-winded description of a relatively simple problem.
from blog.
No problem, the long description made it perfectly clear what you meant!
And thanks for the feedback and spotting it!
from blog.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blog.