Git Product home page Git Product logo

Comments (6)

alperensahin avatar alperensahin commented on August 17, 2024 1

thanks for fast response. It worked!

from material-dashboard.

alexandru-paduraru avatar alexandru-paduraru commented on August 17, 2024

@alperensahin the charts don't appear in the other tabs because the tabs come with "display:none" property, that means the javascript cannot see anything that is inside them, so the javascript doesn't see the charts. What you have to do is to initialize the charts again when the tab is switched. You can see when the tab is switched by using the tabs events from Bootstrap: http://getbootstrap.com/javascript/#tabs-events

So you basically add the init of the chart inside the shown.bs.tab event, because that event is triggered as soon as the tab was completely shown.

Hope this helps!

from material-dashboard.

AntonioBusillo avatar AntonioBusillo commented on August 17, 2024

Hi @alexandru-paduraru I'm trying to add a chart under a tab-pane using two different components like this:

<div class="tab-pane" id="link3"> <my-component></my-component> </div>

I don't understand where I need to put the Javascript code you linked two years ago. Can you help me?

from material-dashboard.

groovemen avatar groovemen commented on August 17, 2024

Hello @AntonioBusillo,

Thank you for using our products, the code from above (http://getbootstrap.com/javascript/#tabs-events) is for Bootstrap 3, if you are using the Bootstrap 4 version please let us know.

Best,
Stefan

from material-dashboard.

AntonioBusillo avatar AntonioBusillo commented on August 17, 2024

Yes, I'm using Bootstrap 4, with the angular version of the Material Dashboard (version 2.2.0)

from material-dashboard.

groovemen avatar groovemen commented on August 17, 2024

So, I will ask you to open this issue on the right repo (for the angular) https://github.com/creativetimofficial/material-dashboard-angular2 and my colleague will help you to solve your issue.

All the best,
Stefan

from material-dashboard.

Related Issues (20)

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.