get(String propertyName)

Returns the value of requested property of chart toolbar.


Parameters:
        propertyName: Name of the property

Example: chart.toolbar.get(“itemBackgroundColor”)

Note:
  • Chart should be rendered before you can use this method.

var  chart =  new  CanvasJS.Chart("container",
{
    .
    .
    toolbar: {
        // Toolbar properties
    },
    .
    . 
});
chart.render();
console.log(chart.toolbar.get("fontColor"));

Properties accessible via get method

Please refer to toolbar element for the complete list of properties that can be accessed via get.


Try it Yourself by Editing the Code below.




If you have any questions, please feel free to ask in our forums.Ask Question