GithubHelp home page GithubHelp logo

Comments (4)

sebastianbochan avatar sebastianbochan commented on July 25, 2024 1

Hi @andrasferenczi,
It can be related with non floated objects (float:left;). Anyway it is difficult to predict, cause I do not have an access to live demo.

Im closing this ticket, cause its related with CSS not HC.

from highcharts-react.

sebastianbochan avatar sebastianbochan commented on July 25, 2024

Hi @andrasferenczi,
The problem can be also related with CSS styles. Have you tried to set width:100% in chart's container div?

from highcharts-react.

KacperMadej avatar KacperMadej commented on July 25, 2024

You could get chart (on which you could later call chart.reflow()) from load event - it's the context in the function.

As Sebastian already mentioned: if size is not correct then you could check if there's a race problem (size change after function run, etc.) or a layout that could be changed into something simpler (unnecessary or forced display style in CSS, etc.).

from highcharts-react.

andrasferenczi avatar andrasferenczi commented on July 25, 2024

Yes, 100% width solved the issue, earlier on it was on auto and every other HTML element fit properly, except Highchart.

Thanks for your help.

@sebastianbochan Just one more question: could you tell me what the problem with auto was in that case?

Anyway, I've typed this out, so I am going to leave it for anyone who might see something similar.

This is my css file:

.react-grid-item > :not(.react-resizable-handle),
.box > * {
    width: auto;
    height: auto;
    max-width: calc(100% - 40px);
    max-height: calc(100% - 40px);

    margin: 20px;
}

This is what I am seeing:

problem

As you can see, the image is resized accordingly. That is why I assumed that the problem should be on Highcharts side.

from highcharts-react.

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.