title.getProperty()

Method Definition: getProperty (String propertyName)
Parent: Chart
Description: getProperty() function used to update or get any one property value at runtime

getProperty() function used to get a particular property value

Function Parameters/Arguments
propertyName
- Name of the property to update

Pseudo code
                      // Read text value from first title of the Chart
document.getElementById('myButton').addEventListener("click", function(){
  let titleElement = chart.titles[0];
  let titleText = titleElement.getProperty('titles');
  alert(titleText);
});                 
                  
Let us checkout the example below. Here in the example there is only one DataSeries of type "Bar" and there are 6 DataPoints in it. DataPoints are set through points property of DataSeries. We add more than one DataSeries to create multi-series Chart very easily.