FusionCharts Beginner’s Guide:The Official Guide for FusionCharts Suite
上QQ阅读APP看书,第一时间看更新

Using JSON data with FusionCharts

JSON is a lightweight and simple data format derived from JavaScript. The data structure is language-independent, with encoders and parsers available for virtually every programming language. FusionCharts allows you to provide JSON data to the chart either as a URL using the setJSONUrl() method or as a string using the setJSONData() method. Before we use these methods, let us convert our previous data from XML format to JSON format to understand this format. To do this, we will use the FusionCharts Data Format Conversion Tool that comes in the FusionCharts download package. Perform the following steps: