V2.0.0 - Canvas based Smartlabel
Canvas is used to carry out width calculations instead of div
This improvement stopped the costly reflows that were taking place while using HTML div elements. Canvas.measureText API is used to calculate the width of the text. This may lead to change in width calculations by 1-2px but it shouldn't be a problem. Developers at FusionCharts have not run into any problem due to this.
In browsers not supporting canvas, HTML div element is used as a fallback.
Improved caching mechanism
Smartlabel uses caching to store the dimensions to prevent multiple usage of the otherwise costly canvas APIs/HTML divs for same text. Minor improvements are made in caching mechanism to improve performance.
ID is not required while initialising smartlabel
To create multiple instances of smartlabel, id was provided in V1. The id was used to manage the instances within smartlabel. ID is deprecated, since the user should take care of the multiple instances.