Giter Site home page Giter Site logo

Comments (6)

nbering avatar nbering commented on May 27, 2024 1

Module sets up a handler to listen for window resize events, which emits resizeMsg:

angular.element($window).on('resize', function () {
$rootScope.$emit('resizeMsg');
});

And then registers to listen for that, and then triggers a re-draw of each chart instance:

resizeHandler = $rootScope.$on('resizeMsg', drawAsync);

If it's not triggering a resize event when it goes fullscreen... you could use the promise returned by Element.requestFullscreen() and emit resizeMsg from the root scope to re-draw all the charts. I'm surprised it's not emitting the resize event already, though.

from angular-google-chart.

nbering avatar nbering commented on May 27, 2024 1

That looks like you probably just need to set the height property on the chart options.

https://developers.google.com/chart/interactive/docs/gallery/linechart#configuration-options

from angular-google-chart.

nbering avatar nbering commented on May 27, 2024 1

The chart builds to the size you specify, or tries to fill the container.

You'll probably need some CSS to make the container element height-responsive. But how to do that is beyond the scope of this project.

Here's an example where I was working with something else (positioning image elements relative to the chart axes), but it's the only sample I have ready where I override the height of the chart in CSS.

https://codepen.io/nbering/pen/yNZxKr

Don't pay any attention to this part:

#container_div {
  position: relative;
}

It was needed for rendering the weather icons which is not what you're working on.

from angular-google-chart.

alirezaseif28 avatar alirezaseif28 commented on May 27, 2024

thanks a lot.
I trace code and see call emit resizeMsg.
but width fullscreen and not height responsive below image.
image
best regards

from angular-google-chart.

alirezaseif28 avatar alirezaseif28 commented on May 27, 2024

thanks a lot.
I want width and height responsive.
please help me.

from angular-google-chart.

alirezaseif28 avatar alirezaseif28 commented on May 27, 2024

thanks a lot.

from angular-google-chart.

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.