You must be logged in to post your query.
Home › Forums › Chart Support › How to display chart by button press?
Tagged: Button Press React
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!
@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
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!
The StackBlitz shared above seems to be working fine. Please refer to the screenshot below.
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.
You must be logged in to reply to this topic. Login/Register