axis.setProperty()

Method Definition: setProperty (String propertyName, Any value)
Parent: Axis
Description: setProperty() function used to update or set any one property value at runtime

setProperty() function used to update or set any one property of Axis at runtime.

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

Pseudo code
                      var chart = new Cosfire.Chart("chart-container", {....});

// Set Data nothing but setting one or more DataSeries having DataPoints in each DataSeries
chart.setDate([...]);

chart.render(function onRenderCompleted() {
  // Once the chart rendered you can update the chart farther

  // Update only one property at once.
  chart.axesY[0].setProperty('title', 'New Axis Title');

  // Now call render again to redraw the chart
  chart.render();
}));                 
                  
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.