Jump to content
Search Community

Vertical bars Chart

rscarpim test
Moderator Tag

Recommended Posts

We're more than happy to help with any GSAP related problems or questions. That animation is not too difficult. Are you working with DOM elements, SVG or maybe canvas? Show us what you have so far and we can point you in the right direction. Thanks.

 

  • Like 3
Link to comment
Share on other sites

Hey guys thank you so much for the reply.

 

I'm using a .png file, for the bars, for example I have 2 bars, so I have to different .png files and I'm showing them from bottom to top, but I would like to know a different way to do it, I mean without using a .png file

 

Thank you guys for the help!!!!

Link to comment
Share on other sites

Hey guys sorry about the question, but I've trying to implement the solution that @elegantseagulls posted, but I need more help.

 

is there a cdn that I can use for the gsap, also how do I implement that, like how I instantiate the gsap class, and then make the calls.

 

Sorry guys I'm just a new guy trying to use this amazing tool.

 

Thanks.

Link to comment
Share on other sites

This is what I got so far:

 

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">



    <title>Document</title>
</head>
<body>


    <div class="img-wrapper-1">

        <img  id="img-bar" src="bar-1.png" style="opacity: 0">
    </div>

    <script src="scripts/vendor/jquery-3.2.1.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.1/TweenLite.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.1/TimelineMax.min.js"></script>


    <script>

        let bars = document.getElementById('img-bar');

        let tl = new TimelineMax({});

        tl.set(bars, {autoAlpha: 1});
        tl.from(bars, {scaleY: 0, transformOrigin: '0% 100%', stagger: .1});
    </script>


</body>
</html>

 

Link to comment
Share on other sites

You can probably remove that image from the div and just use a background color for now. Then add some more divs & CSS to style them to your liking. Have you tried making a demo as I suggested above? It will be a lot easier to offer assistance if you do that. Thanks. :)

 

 

 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...