Git Product home page Git Product logo

Comments (8)

AlexanderBlaufuss avatar AlexanderBlaufuss commented on August 15, 2024 1

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.

Dschaykib avatar Dschaykib commented on August 15, 2024

I will have a look in the next days.

from blog.

Dschaykib avatar Dschaykib commented on August 15, 2024

It was just named incorrectly. I changed the name. Hope this helps you @DavidLloydNGP. If not, let me know.

from blog.

Dschaykib avatar Dschaykib commented on August 15, 2024

And for completeness, this is the folder for the blog post's example:
https://github.com/STATWORX/blog/tree/master/DashApp

from blog.

DavidLloydNGP avatar DavidLloydNGP commented on August 15, 2024

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.

Dschaykib avatar Dschaykib commented on August 15, 2024

Ah ok. I will get in touch with the author and let him know :)

from blog.

DavidLloydNGP avatar DavidLloydNGP commented on August 15, 2024

Thank you. Apologies for the long-winded description of a relatively simple problem.

from blog.

Dschaykib avatar Dschaykib commented on August 15, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.