Chart title does not update

I have a ChartComponent, in a functional react component, with a title that I wish to change. I can change the titles alignment, font size etc. etc., but I can not change the title itself. It is simply not reactive to the bound property being changed. Resizing the chart does not update the title, nor does calling chartInstance.refresh()


3 Replies

DG Durga Gopalakrishnan Syncfusion Team August 12, 2021 02:50 PM UTC

Hi Jens, 

Greetings from Syncfusion. 

We suggest you to use chart refresh method to update the chart title. We have prepared sample based on your requirement. Please check with the below snippet and screenshot. 

function Chart() { 
   var chartInstance = ChartComponent; 
  function clickHandler(){ 
    chartInstance.title = "Inflation"; 
    chartInstance.refresh(); 
  } 
} 

Before Update 

 
After Update 

 


Kindly revert us if you have any concerns. 

Regards, 
Durga G


JE Jens August 17, 2021 07:22 AM UTC

Hi, as written in my first post, I have already tried calling chartInstance.refresh(). This does *not* change the chart title either.



DG Durga Gopalakrishnan Syncfusion Team August 18, 2021 02:20 PM UTC

Hi Jens, 

Please specify in which scenario you are facing the reported issue. Since we are unable to replicate an issue from our end, please share the following information which will be more helpful for further analysis and provide you the solution sooner. 
  • Try to reproduce the reported scenario in the below sample.
  • Please share your sample (or) code snippet with full configurations.
  • Share the details if you have done any other customization in your sample.
  • Share your datasource file.
  • Share your package version.
 
 
Kindly revert us, if you have any concerns. 
 
Regards, 
Durga G 


Loader.
Up arrow icon