Home Forums Chart Support How to display chart by button press?

How to display chart by button press?

Viewing 4 posts - 1 through 4 (of 4 total)
  • #32710

    In react javascript, I am trying to display the chart found here: https://canvasjs.com/react-charts/bar-chart/ by button press.

    However, while no error occurs, the chart does not display? Thank you!

    • This topic was modified 3 years, 9 months ago by Charthelpplz.
    #32736

    @charthelpplz,

    You can achieve the above requirement by passing the CanvasJSChart component on button click. Please take a look at this StackBlitz for an example.

    ___________
    Indranil Deo
    Team CanvasJS

    #32743

    Thank you Indranil! This code pretty much does what I want/need it to! However, when I click on “click to render chart” the screen turns white and nothing is displayed. Do you know what could be the cause? Thank you!

    #32744

    @charthelpplz,

    The StackBlitz shared above seems to be working fine. Please refer to the screenshot below.

    display chart on button click in react

    If you are still facing issue, kindly create an example reproducing the issue in StackBlitz and share it with us so that we can look into the code, understand the scenario better and help you resolve.

    ___________
    Indranil Deo
    Team CanvasJS

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.