Giter Club home page Giter Club logo

Comments (10)

gor181 avatar gor181 commented on May 3, 2024 2

hey @volkandkaya ,

I have #59 open which should include that possibility too, needs a bit fine tuning and then it's ready to go.

from react-chartjs-2.

gor181 avatar gor181 commented on May 3, 2024 2

hey @volkandkaya ,

I have an issue with getting tests to pass on Travis, while working nicely locally..
So besides that there are no issues on merging it in.

I need to think whether I can skip that test stuff for now.
Will let you know shortly.

from react-chartjs-2.

gor181 avatar gor181 commented on May 3, 2024 1

hey @volkandkaya ,

1.6.0 has been released.

Basically all you need is to modify the width or / and height props.
let me know how it goes.

from react-chartjs-2.

volkandkaya avatar volkandkaya commented on May 3, 2024 1

Is there anyway to force a refresh, if I switch using react-router it fixes itself.

I had to use
<ChartComponent key={chart.height * chart.width} />

Key basically makes it re-render.

from react-chartjs-2.

gor181 avatar gor181 commented on May 3, 2024 1

Tried redraw={true} ?

from react-chartjs-2.

volkandkaya avatar volkandkaya commented on May 3, 2024

@gor181 how long until it will be ready for use? This package is perfect except for the reloading.

from react-chartjs-2.

volkandkaya avatar volkandkaya commented on May 3, 2024

Thanks, I can't get it working. It refreshes but the height and width don't change.

However I was also changing the colours and that didn't work, after 1.6 it now works which is great. So I am not sure why height and width don't work.

from react-chartjs-2.

gor181 avatar gor181 commented on May 3, 2024

hey,

I would suggest to add the div with style (width, height) around as we render only canvas element which width/height seems to be overriden by chart.js regardless of what options are set.

from react-chartjs-2.

volkandkaya avatar volkandkaya commented on May 3, 2024

Didn't work. I will stick to key for now. Thanks for all the help.

from react-chartjs-2.

janpaul123 avatar janpaul123 commented on May 3, 2024

This is still a problem for me. I also ended up using

key={`${width}x${height}`}

from react-chartjs-2.

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.